Solid State Drive

By integrating firmware in the controller of the solid-state drive, and actively judging memory blocks using logical entity comparison tables and disk segmentation tables, the problem that early operating systems did not support TRIM instructions was solved, and efficient garbage collection of solid-state drives and efficient utilization of memory blocks was achieved.

CN115454882BActive Publication Date: 2025-07-11APACER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110640879.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-09
Publication Date
2025-07-11
Estimated Expiration
2041-06-09

AI Technical Summary

Technical Problem

Early operating systems did not support TRIM instructions, resulting in the performance of SSDs degraded under frequent garbage collection operations, and it is difficult to ensure the optimal timing of TRIM instructions.

Method used

Integrate firmware in the controller, and through logical entity comparison tables and disk segmentation tables, it actively judges and recycles available memory blocks, realizes active pruning operations, and avoids waiting for the operating system to issue instructions.

Benefits of technology

In systems that do not support TRIM instructions, it can also effectively improve the garbage collection efficiency of solid-state drives, ensure efficient utilization of memory blocks, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115454882B_ABST
    Figure CN115454882B_ABST
Patent Text Reader

Abstract

A solid-state drive, which includes a circuit board, a non-volatile memory module, and a controller. The non-volatile memory module is disposed on the circuit board and includes a plurality of non-volatile memory blocks for storing data. The operating system is installed in a logical disk formed by at least some of the non-volatile memory blocks. The controller is disposed on the circuit board, coupled to the non-volatile memory module, and used to execute firmware to perform an active trimming operation on the non-volatile memory blocks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a solid state drive, and more particularly to a solid state drive that can actively perform a TRIM operation. Background Art

[0002] In recent years, solid state drives (SSDs) have gradually replaced traditional hard disks. Therefore, various operating systems have proposed various instructions exclusive to solid state drives in order to improve the performance of solid state drives. Among these instructions, the TRIM instruction is an instruction that is very helpful for the performance and stability of solid state drives.

[0003] The TRIM instruction is mainly initiated by the operating system, which notifies the solid state drive of which LBA positions contain invalid data, so that the solid state drive can first perform an internal garbage collection (GC) operation to release memory blocks for future use. Although this method can effectively release memory blocks, early operating systems did not support the TRIM instruction. For users using an operating system that does not support TRIM, after long-term use, the performance of the solid state drive will experience a sense of jerk during use due to frequent garbage collection (GC) operations. In addition, the TRIM instruction must be issued by the operating system to the solid state drive, and whether the time point at which the operating system issues the TRIM instruction is the best timing point for the solid state drive remains to be discussed. Summary of the Invention

[0004] An embodiment of the present invention provides a solid state drive (SSD), which includes a circuit board, a non-volatile memory module, and a controller. The non-volatile memory module is disposed on the circuit board and includes a plurality of non-volatile memory blocks for storing data. The operating system is installed in a logical disk formed by at least some of the non-volatile memory blocks. The controller is disposed on the circuit board and is coupled to the non-volatile memory module, and is used to execute firmware to perform an active trimming operation on the non-volatile memory blocks. The active trimming operation includes: obtaining a disk partition table of the solid state drive according to a logical-to-physical table (L2P table) of the solid state drive; reading information of a file system of the operating system from the non-volatile memory blocks according to the logical-to-physical table and the disk partition table; determining which non-volatile memory blocks in the logical disk can be recycled according to the information of the file system; and recycling the non-volatile memory blocks determined to be recyclable. Description of the Drawings

[0005] Figure 1 It is a functional block diagram of a computer system equipped with a solid-state drive according to an embodiment of the present invention.

[0006] Figure 2 It shows Figure 1 the relevant data stored in the non-volatile memory module in

[0007] Figure 3 It is Figure 1 a flowchart when the solid-state drive in

[0008] Figure 4 performs an active trimming operation.

[0009] Description of reference numerals:

[0010] 1 Computer system

[0011] 10 Processor

[0012] 100 Solid-state drive

[0013] 110 Circuit board

[0014] 120 Non-volatile memory module

[0015] 122 Non-volatile memory block

[0016] 130 Controller

[0017] 132 Firmware

[0018] 140 Transmission interface

[0019] 152 Logical entity correspondence table

[0020] 154 Disk partition table

[0021] 156 Starting position of logical disk

[0022] 160 File system information

[0023] 162 Master File Table (MFT)

[0024] 164 Bitmap

[0025] 170 Program code of operating system

[0026] 300, 400 Active trimming operation

[0027] Steps S310 to S360, S410 to S450 Detailed implementation manners

[0028] Figure 1 is a functional block diagram of a computer system 1 equipped with a solid-state drive 100 according to an embodiment of the present invention. Figure 2 shows Figure 1 the relevant data stored in the non-volatile memory module 120 in. The solid-state drive 100 includes a circuit board 110, a non-volatile memory module 120, and a controller 130. The non-volatile memory module 120 is disposed on the circuit board 110 and includes a plurality of non-volatile memory blocks 122 for storing data. Each non-volatile memory block 122 may be a flash memory. The non-volatile memory module 120 can be divided into one or more logical disks, and each logical disk may include all or part of the non-volatile memory blocks 122. An operating system is installed in one of the logical disks. The controller 130 is disposed on the circuit board 110, coupled to the non-volatile memory module 120, and is used to execute firmware 132 to perform operations related to programming, erasing, reading, and active trimming operations on the non-volatile memory blocks 122.

[0029] The solid-state drive 100 further includes a transmission interface 140 coupled to the processor 10 of the computer system 1. The processor 10 can execute the program code 170 of the operating system stored in the non-volatile memory module 120 to control the operation of the computer system 1 and perform data access to the solid-state drive 100. In an embodiment of the present invention, when the controller 130 does not receive any instruction from the processor 10 through the transmission interface 140 for more than a predetermined time (e.g., 5 minutes or other preset time length), the controller 130 can actively perform an active trimming operation without waiting for a trim instruction issued by the operating system executed by the processor 10.

[0030] Figure 3 is Figure 1 a flowchart of the solid-state drive when performing an active trimming operation 300. The active trimming operation 300 may include the following steps:

[0031] Step S310: The controller 130 reads the logical block address (LBA) information of the logical disk; among them, the logical disk being read has the program code 170 of the operating system executed by the processor 10, and in this step, the controller 130 can first read the logical-to-physical table (L2P table) 152 stored in the non-volatile memory module 120, and read the disk partition table 154 of the solid-state drive 100 according to the logical-to-physical table 152, and then according to the disk partition table 154, know the starting position 156 of the logical disk, and know which operating system it is and its file system information 160, and the above disk partition table 154 is, for example, the Master Boot Record (MBR) or the GUID Partition Table (GPT);

[0032] Step S320: The controller 130 determines whether the firmware 132 can recognize the format of the file system information 160 to perform proactive trimming; if the firmware 132 can recognize the format of the file system information 160, then perform proactive trimming, and then execute steps S340 to S360; if the firmware 132 cannot recognize the format of the file system information 160, then execute step S330;

[0033] Further explanation, in step S320, the firmware 132 is preset to be set to recognize the format of common or specific file system information, such as NTFS, FAT 32, etc. When the format of this file system information 160 is one of NTFS or FAT 32, then step S340 will be executed. On the contrary, if the format of this file system information 160 is not within the preset coverage of the firmware 132, taking FAT16 as an example, then step S330 will be executed at this time;

[0034] Step S330: Perform passive trimming operations; that is, issue a trim (TRIM) command to the solid-state drive 100 in a traditional way by the operating system to perform a trimming operation on the solid-state drive 100; among them, if the operating system does not support the TRIM command, then this step S330 can be omitted;

[0035] Step S340: The controller 130 analyzes the system architecture of the logical sector; in this step, the controller 130 can obtain the file system information 160 of the operating system, that is, the controller 130 can know which file system the operating system uses to manage the above logical disk;

[0036] Step S350: The controller 130 obtains the space distribution of the non-volatile memory blocks 122 of the logical disk. Taking the installed operating system as Windows 7 as an example, the controller 130 can obtain the Master File Table (MFT) 162 and Bitmap 164 of the operating system in this step. Among them, the Bitmap 164 is used to record the usage status of each non-volatile memory block 122 of the logical disk, and the controller 130 can know which non-volatile memory blocks 122 in the logical disk can be recycled according to the Bitmap 164; and

[0037] Step S360: The controller 130 recycles the non-volatile memory blocks 122 that are judged to be recyclable.

[0038] In step S350, when the value of the bit in the Bitmap 164 corresponding to a non-volatile memory block 122 of the logical disk is the first bit value (for example: 0), the controller 130 determines that this non-volatile memory block 122 is a recyclable non-volatile memory block 122 and recycles the non-volatile memory block 122. When the value of the bit in the Bitmap 164 corresponding to a non-volatile memory block 122 of the logical disk is the second bit value (for example: 1), the controller 130 determines that this non-volatile memory block 122 is a non-recyclable non-volatile memory block 122. In addition, when the controller 130 recycles the non-volatile memory blocks 122 that are judged to be recyclable, the controller 130 can erase the data in the recyclable non-volatile memory blocks 122.

[0039] Figure 4 It is a flowchart of the active trimming operation 400 of the present invention when the operating system is WINDOWS 7 and the file system is NTFS. The active trimming operation 400 includes the following steps:

[0040] Step S410: The controller 130 reads the disk partition table 154 of the solid-state drive 100 according to the logical physical mapping table (L2P table) 152 of the solid-state drive 100, and the disk partition table 154 is generally stored in the first non-volatile memory block 122 (i.e., LBA 0) of the logical disk;

[0041] Step S420: The controller 130 obtains the starting position 156 of the logical disk (i.e., the position of the Boot sector) according to the disk partition table 154;

[0042] Step S430: The controller 130 obtains the address of the Master File Table (MFT) 162 of the operating system according to the starting position 156 of the logical disk;

[0043] Step S440: The controller 130 obtains a bitmap 164 according to the address of the master file table (MFT) 162, so as to determine which non-volatile memory blocks 122 in the logical disk can be recycled according to the bitmap 164; and

[0044] Step S450: The controller 130 recycles the non-volatile memory blocks 122 that are determined to be recyclable.

[0045] For a logical sector with a FAT file system, the bitmap 164 obtained in step S440 can be replaced by the file allocation table (FAT Table 1) of the FAT file system; for a logical sector with an EXT file system, the bitmap 164 obtained in step S440 can be replaced by the block map of the EXT file system; for a logical sector with an HFS+ file system, the bitmap 164 obtained in step S440 can be replaced by the allocation file of the HFS+ file system.

[0046] The triggering opportunity of the above active trimming operations 300 and 400 can be that when the controller 130 does not receive any instructions from the processor 10 through the transmission interface 140 for more than a predetermined time (for example: 5 minutes or other preset time lengths), the controller 130 actively executes. However, the present invention is not limited thereto. For example, in another embodiment of the present invention, the user is allowed to actively command the controller 130 of the solid-state drive 100 to execute the above active trimming operations 300 or 400 through a program executed by the computer system 1.

[0047] In the above embodiment, the solid-state drive 100 can analyze the non-volatile memory module 120 through the firmware 132 executed by the controller 130, so as to know the usage status of each non-volatile memory block 122, and then can perform an active trimming operation on the non-volatile memory block 122 without waiting for the operating system to issue a TRIM instruction to the solid-state drive 100. Moreover, for an operating system that does not support the TRIM instruction (such as WINDOWS 95), through the present invention, when the firmware 132 supports the file system of this operating system, the benefits brought by the TRIM instruction can still be enjoyed. In addition, for an operating system that supports the TRIM instruction, the controller 130 can actively perform the above active trimming operation after the solid-state drive 100 is idle for a preset time, thereby improving the efficiency of the garbage collection (GC) operation.

[0048] The above are only the preferred embodiments of the present invention, and all equivalent changes and modifications made according to the scope of the claims of the present invention shall fall within the scope covered by the present invention.

Claims

1. A solid state drive, comprising: A circuit board; A non-volatile memory module is disposed on the circuit board and includes a plurality of non-volatile memory blocks for storing data, wherein an operating system is installed in a logical disk formed by at least some of the non-volatile memory blocks; And A controller, disposed on the circuit board, and coupled to the non-volatile memory module, and configured to execute a firmware to perform an active trimming operation on the non-volatile memory blocks, the active trimming operation comprising: Obtaining a disk partition table of the solid state drive according to a logical entity mapping table of the solid state drive; Reading information of a file system of the operating system from the non-volatile memory blocks according to the logical entity mapping table and the disk partition table; Judging which non-volatile memory blocks in the logical disk can be recycled according to the information of the file system; And Recycling the non-volatile memory blocks determined to be recyclable.

2. The solid state drive according to claim 1, wherein the information of the file system comprises: Which operating system the operating system is; Which file system the file system is; and Address information of a plurality of logical block addresses of the logical disk.

3. The solid state drive according to claim 2, wherein the logical block address comprises: The starting position of a main file table of the file system in the non-volatile memory blocks; and The address of a bitmap of the file system, wherein the bitmap is used to record the usage of each non-volatile memory block of the logical disk.

4. The solid state drive according to claim 3, wherein each bit of the bitmap corresponds to a non-volatile memory block of the logical disk; and When the value of the bit in the bitmap corresponding to a non-volatile memory block of the logical disk is a first bit value, the controller determines that the non-volatile memory block is a recyclable non-volatile memory block, and recycles the non-volatile memory block.

5. The solid state drive according to claim 1, wherein when the controller recycles the non-volatile memory blocks determined to be recyclable, the controller erases the data of the recyclable non-volatile memory blocks.

6. The solid state drive according to claim 1, further comprising: a transmission interface, coupled to a computer system; Wherein when the controller does not receive any instructions from a processor of the computer system through the transmission interface for more than a predetermined time, the controller actively performs the active trimming operation.

7. The solid state drive according to claim 6, wherein the processor reads the operating system from the logical disk through the transmission interface and executes the operating system to control the operation of the computer system.

Citation Information

Patent Citations

  • Method and device for writing data and redundant array of inexpensive disk

    CN102023810A

  • Method for trimming data on non-volatile flash media

    CN102096639A