The present invention provides a control method of a flash memory controller is disclosed, wherein the flash memory controller is configured to access a flash memory module, and the control method comprising: allocating a memory space within a memory for storing data from the host device; dividing the memory space into a plurality of zone buffers, wherein each of the zone buffers is used to store data corresponding to one zone having an opened state; and for a first zone buffer of the plurality of zone buffers, controlling a first buffer and a second buffer within the first zone buffer to alternately store data of a first zone from the host device and write the data of the first zone to a zoned namespace of the flash memory module.
|
1. A control method of a flash memory controller, wherein the flash memory controller is configured to access a flash memory module, the flash memory module comprises a plurality of blocks, and the control method comprising:
receiving a settling command from a host device, wherein the settling command configures at least one portion of the flash memory module as a zoned namespace, wherein the zoned namespace logically comprises a plurality of zones, the host device performs a zone-based data write operation on the zoned namespace, where a size of each zone of the plurality of zones is of a same size, logical addresses corresponding to each zone are continuous, and the logical addresses are not overlapping between zones;
allocating a memory space within a memory for storing data from the host device;
dividing the memory space into a plurality of zone buffers, wherein each of the zone buffers is used to store data corresponding to one zone having an opened state; and
for a first zone buffer of the plurality of zone buffers, controlling a first buffer and a second buffer within the first zone buffer where the first buffer and the second buffer are configured to respectively alternately store data of a first zone from the host device and write the data of the first zone to the zoned namespace of the flash memory module.
15. A storage device, comprising:
a flash memory module, wherein the flash memory module comprises a plurality of blocks; and
a flash memory controller, configured to access the flash memory module;
wherein the flash memory controller is configured to perform the steps of:
receiving a settling command from a host device, wherein the settling command configures at least one portion of the flash memory module as a zoned namespace, wherein the zoned namespace logically comprises a plurality of zones, the host device performs a zone-based data write operation on the zoned namespace, where a size of each zone of the plurality of zones is of a same size, logical addresses corresponding to each zone are continuous, and the logical addresses are not overlapping between zones;
allocating a memory space within a memory for storing data from the host device;
dividing the memory space into a plurality of zone buffers, wherein each of the zone buffers is used to store data corresponding to one zone having an opened state; and
for a first zone buffer of the plurality of zone buffers, controlling a first buffer and a second buffer within the first zone buffer where the first buffer and the second buffer are configured to respectively alternately store data of a first zone from the host device and write the data of the first zone to the zoned namespace of the flash memory module.
8. A flash memory controller, wherein the flash memory controller is configured to access a flash memory module, the flash memory module comprises a plurality of blocks, and the flash memory controller comprising:
a read only memory, configured to store a code;
a microprocessor, configured to execute the code for controlling access of the flash memory module; and
a buffer memory;
wherein the microprocessor is configured to perform the steps of:
receiving a settling command from a host device, wherein the settling command configures at least one portion of the flash memory module as a zoned namespace, wherein the zoned namespace logically comprises a plurality of zones, the host device performs a zone-based data write operation on the zoned namespace, where a size of each zone of the plurality of zones is of a same size, logical addresses corresponding to each zone are continuous, and the logical addresses are not overlapping between zones;
allocating a memory space within a memory for storing data from the host device;
dividing the memory space into a plurality of zone buffers, wherein each of the zone buffers is used to store data corresponding to one zone having an opened state; and
for a first zone buffer of the plurality of zone buffers, controlling a first buffer and a second buffer within the first zone buffer where the first buffer and the second buffer are configured to respectively alternately store data of a first zone from the host device and write the data of the first zone to the zoned namespace of the flash memory module.
2. The control method of
configuring the zoned namespace to have a plurality of super blocks, wherein each of the plurality of super block comprises a plurality of blocks respectively located in different logical units (LUN); and
for a first super block of the plurality of super blocks, configuring the first super block to have a plurality of super pages, wherein each of the plurality of super pages comprises a plurality of pages respectively located in different blocks of the first super block;
wherein a size of the first buffer is equal to a size of the second buffer, and the size of the first buffer is determined according to a size of one super page.
3. The control method of
4. The control method of
5. The control method of
6. The control method of
for a second zone buffer of the plurality of zone buffers, controlling a third buffer and a fourth buffer within the second zone buffer to alternately store data of a second zone from the host device and write the data of the second zone to the zoned namespace of the flash memory module;
determining if an idle time of the second zone or the second zone buffer is greater than a threshold value to generate a determination result;
in response to the determination result indicating that the idle time of the second zone or the second zone buffer is greater than the threshold value, reallocating the third buffer and the fourth buffer of the second zone buffer to store the data of the first zone from the host device and write the data of the first zone to the zoned namespace of the flash memory module.
7. The control method of
in response to the determination result indicating that the idle time of the second zone or the second zone buffer is greater than the threshold value, reallocating the first zone buffer and the second zone buffer to alternately store the data of the first zone from the host device and write the data of the first zone to the zoned namespace of the flash memory module.
9. The flash memory controller of
configuring the zoned namespace to have a plurality of super blocks, wherein each of the plurality of super block comprises a plurality of blocks respectively located in different logical units (LUN); and
for a first super block of the plurality of super blocks, configuring the first super block to have a plurality of super pages, wherein each of the plurality of super pages comprises a plurality of pages respectively located in different blocks of the first super block;
wherein a size of the first buffer is equal to a size of the second buffer, and the size of the first buffer is determined according to a size of one super page.
10. The flash memory controller of
11. The flash memory controller of
12. The flash memory controller of
13. The flash memory controller of
for a second zone buffer of the plurality of zone buffers, controlling a third buffer and a fourth buffer within the second zone buffer to alternately store data of a second zone from the host device and write the data of the second zone to the zoned namespace of the flash memory module;
determining if an idle time of the second zone or the second zone buffer is greater than a threshold value to generate a determination result;
in response to the determination result indicating that the idle time of the second zone or the second zone buffer is greater than the threshold value, reallocating the third buffer and the fourth buffer of the second zone buffer to store the data of the first zone from the host device and write the data of the first zone to the zoned namespace of the flash memory module.
14. The flash memory controller of
in response to the determination result indicating that the idle time of the second zone or the second zone buffer is greater than the threshold value, reallocating the first zone buffer and the second zone buffer to alternately store the data of the first zone from the host device and write the data of the first zone to the zoned namespace of the flash memory module.
16. The storage device of
configuring the zoned namespace to have a plurality of super blocks, wherein each of the plurality of super block comprises a plurality of blocks respectively located in different logical units (LUN); and
for a first super block of the plurality of super blocks, configuring the first super block to have a plurality of super pages, wherein each of the plurality of super pages comprises a plurality of pages respectively located in different blocks of the first super block;
wherein a size of the first buffer is equal to a size of the second buffer, and the size of the first buffer is determined according to a size of one super page.
17. The storage device of
for a second zone buffer of the plurality of zone buffers, controlling a third buffer and a fourth buffer within the second zone buffer to alternately store data of a second zone from the host device and write the data of the second zone to the zoned namespace of the flash memory module;
determining if an idle time of the second zone or the second zone buffer is greater than a threshold value to generate a determination result;
in response to the determination result indicating that the idle time of the second zone or the second zone buffer is greater than the threshold value, reallocating the third buffer and the fourth buffer of the second zone buffer to store the data of the first zone from the host device and write the data of the first zone to the zoned namespace of the flash memory module.
18. The storage device of
in response to the determination result indicating that the idle time of the second zone or the second zone buffer is greater than the threshold value, reallocating the first zone buffer and the second zone buffer to alternately store the data of the first zone from the host device and write the data of the first zone to the zoned namespace of the flash memory module.
|
The present invention relates to a flash memory, and more particularly, to a flash memory controller and an associated control method.
In the Non-Volatile Memory express (NVMe) specification, a zoned namespace is standardized. In a storage system, a host device can assign a plurality of zones, and each zone has one of a plurality of states such as empty state, opened state, closed state, full state, read-only state and off-line state. The opened state means that the corresponding zone is allowed to be written data by the host device, so a storage device such as a solid-state drive (SSD) will allocate a dedicated space in a dynamic random access memory (DRAM) for the zone to use. For example, if the host device indicates that four of the zones have the opened state, the storage device needs to allocate four dedicated spaces in the DRAM.
However, due to the limited capacity of the DRAM, there is an upper limit to a number of the zones having the opened state. Therefore, the host device cannot open too many zones for data writing, resulting in that the performance of the storage device cannot be further increased.
It is therefore an objective of the present invention to provide a flash memory controller capable of efficiently managing the DRAM and a flash memory module, to solve the above-mentioned problems.
According to one embodiment of the present invention, a control method of a flash memory controller is disclosed, wherein the flash memory controller is configured to access a flash memory module, the flash memory module comprises a plurality of blocks, and the control method comprising: receiving a settling command from a host device, wherein the settling command configures at least one portion of the flash memory module as a zoned namespace, wherein the zoned namespace logically comprises a plurality of zones, the host device performs a zone-based data write operation on the zoned namespace, each zone has a same size, logical addresses corresponding to each zone are continuous, and the logical addresses are not overlapping between zones; allocating a memory space within a memory for storing data from the host device; dividing the memory space into a plurality of zone buffers, wherein each of the zone buffers is used to store data corresponding to one zone having an opened state; and for a first zone buffer of the plurality of zone buffers, controlling a first buffer and a second buffer within the first zone buffer to alternately store data of a first zone from the host device and write the data of the first zone to the zoned namespace of the flash memory module.
According to one embodiment of the present invention, a flash memory controller is disclosed, wherein the flash memory controller is configured to access a flash memory module, the flash memory module comprises a plurality of blocks, and the flash memory controller comprising a read only memory configured to store a code, and a microprocessor configured to execute the code for controlling access of the flash memory module, and a buffer memory. The microprocessor is configured to perform the steps of: receiving a settling command from a host device, wherein the settling command configures at least one portion of the flash memory module as a zoned namespace, wherein the zoned namespace logically comprises a plurality of zones, the host device performs a zone-based data write operation on the zoned namespace, each zone has a same size, logical addresses corresponding to each zone are continuous, and the logical addresses are not overlapping between zones; allocating a memory space within a memory for storing data from the host device; dividing the memory space into a plurality of zone buffers, wherein each of the zone buffers is used to store data corresponding to one zone having an opened state; and for a first zone buffer of the plurality of zone buffers, controlling a first buffer and a second buffer within the first zone buffer to alternately store data of a first zone from the host device and write the data of the first zone to the zoned namespace of the flash memory module.
According to one embodiment of the present invention, a storage device comprising a flash memory module and a flash memory controller is disclosed. The flash memory module comprises a plurality of blocks, and the flash memory controller is configured to access the flash memory module. The flash memory controller is configured to perform the steps of: receiving a settling command from a host device, wherein the settling command configures at least one portion of the flash memory module as a zoned namespace, wherein the zoned namespace logically comprises a plurality of zones, the host device performs a zone-based data write operation on the zoned namespace, each zone has a same size, logical addresses corresponding to each zone are continuous, and the logical addresses are not overlapping between zones; allocating a memory space within a memory for storing data from the host device; dividing the memory space into a plurality of zone buffers, wherein each of the zone buffers is used to store data corresponding to one zone having an opened state; and for a first zone buffer of the plurality of zone buffers, controlling a first buffer and a second buffer within the first zone buffer to alternately store data of a first zone from the host device and write the data of the first zone to the zoned namespace of the flash memory module.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
In a general situation, the flash memory module 124 includes a plurality of flash memory chips, and each flash memory chip includes a plurality of blocks. The flash memory controller 122 performs a block-based erase operation upon the flash memory module 124. In addition, a block has a specific number of pages, wherein the flash memory controller 122 performs a page-based write operation upon the flash memory module 124. In the present embodiment, the flash memory module 124 is a 3D NAND-type flash memory module.
In practice, through the microprocessor 212 executing the code 212C, the flash memory controller 122 may use its own internal components to perform many control operations. For example, the flash memory controller 122 uses the control logic 214 to control access of the flash memory module 124 (especially access of at least one block or at least one page), uses the buffer memory 216 to perform a required buffering operation, and uses the interface logic 218 to communicate with a host device 110. The buffer memory 216 is implemented by a random access memory (RAM). For example, the buffer memory 216 may be a static RAM (SRAM), but the present invention is not limited thereto. In addition, the flash memory controller 122 is coupled to a dynamic random access memory (DRAM) 240. It should be noticed that a DRAM 240 may also be included in the flash memory controller 122. For example, the DRAM 240 and the flash memory controller 122 may coexist in the same package.
In one embodiment, the storage device 120_1 conforms to the NVme specification. That is, the interface logic 218 conforms to a specific communication specification such as a peripheral component interconnect (PCI) or a specification PCI-Express (PCIe) specification, and performs communication according to the specific communication specification. For example, the interface logic 218 communicates with the host device 110 via a connector.
In the present embodiment, the host device 110 can configure at least a part of the flash memory module 124 as a zoned namespace by sending a settling command set, such as a zoned namespace command set. Referring to
In addition, when being written in each zone, the data is written according to the sequence of the logical addresses of the data. In detail, the flash memory controller 122 sets a write point according to the written data to control the writing sequence of the data. In detail, assuming that the zone Z1 is used to store data with logical addresses LBA_2001-LBA_4000, after the host device 110 transmits the data corresponding to the logical addresses LBA_2001-LBA_2051 to the flash memory controller 122, the flash memory controller 122 sets the write point to the next logical address LBA_2052. If the host device 110 subsequently transmits data belonging to the same zone but does not have the logical address LBA_2052, for example, the host device 110 transmits data with the logical address LBA_3000, the flash memory controller 122 rejects the data writing operation and returns the message of writing failure to the host device 110; in other words, only when the logical address of the received data is the same as the logical address pointed to by the write point, the flash memory controller 122 allows the data writing operation. In addition, if data in multiple zones are written alternately, each zone can have its own write point.
The size of each zone can be determined according to the host device 110, and the host device 110 may refer to a configuration of the storage device 120_1 to determine the zone size.
In one embodiment, quantity of the channels and quantity of the chip enable signals can be determined according to designer's consideration, for example, the storage device 120_1 may have sixteen channels and four chip enable signals (i.e., N is equal to “16”, and M is equal to “4”).
In light of above, by using the first buffer 920_1 and the second buffer 920_2 to alternately store data from the host device 110 and write data to the flash memory module 124, the flash memory controller 122 can write data into the flash memory module 124 with better efficiency.
In the embodiment shown in
In light of above, by using the first buffer 1120_1 and the second buffer 1120_2 to alternately store data from the host device 110 and write data to the flash memory module 124, the flash memory controller 122 can write data into the flash memory module 124 with better efficiency. In addition, because each of the first buffer 1120_1 and the second buffer 1120_2 has only half the size of one super page, the memory space 1110 can be divided to have more zone buffers, and the host device 110 can open more zones for data writing.
In another embodiment, each of the first buffer 1120_1 and the second buffer 1120_2 can be configured to have a size equal to pages corresponding to one or more chip enable signals. For example, the size of the first buffer 1120_1 is equal to all the pages of the blocks of the LUNs corresponding to one chip enable signal such as CE_1, that is the size of the first buffer 1120_1 is equal to N*page size; or the size of the first buffer 1120_1 is equal to all the pages of the blocks of the LUNs corresponding to two chip enable signal such as CE_1 and CE_2, that is the size of the first buffer 1120_1 is equal to 2*N*page size. These alternative designs shall fall within the scope of the present invention.
The embodiments shown in
In the operation of the embodiment shown in
Specifically, if the microprocessor 212 detects that the idle time of the zone Z2 is greater than the threshold value, the microprocessor 212 can reallocate the zones Z1 and Z2 so that both the zone buffers 1312 and 1314 are used to store the data of zone Z1. At this time, the first buffer 1320_1 and the second buffer 1320_1 included in the zone buffer 1312 serve as the first buffer 920_1 shown in
Then, if the host device 110 notifies the flash memory controller 122 that the zone Z2 is to be written, the microprocessor 212 can reallocate the zones Z1 and Z2 to the original states, that is the first buffer 1320_1 and the second buffer 1320_2 of the zone buffer 1312 are configured to alternately store data (half of the super page) from the host device 110 and write data (half of the super page) to the super block corresponding to the zone Z1, and the third buffer 1320_3 and the fourth buffer 1320_4 are configured to alternately store data (half of the super page) from the host device 110 and write data (half of the super page) to the super block corresponding to the zone Z2.
In another embodiment, each of the first buffer 1320_1, the second buffer 1320_2, the third buffer 1320_3 and the fourth buffer 1320_4 can be configured to have a size equal to pages corresponding to one or more chip enable signals. For example, the size of the first buffer 1320_1 is equal to all the pages of the blocks of the LUNs corresponding to one chip enable signal such as CE_1, that is the size of the first buffer 1320_1 is equal to N*page size; or the size of the first buffer 1320_1 is equal to all the pages of the blocks of the LUNs corresponding to two chip enable signal such as CE_1 and CE_2, that is the size of the first buffer 1320_1 is equal to 2*N*page size. These alternative designs shall fall within the scope of the present invention.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
Patent | Priority | Assignee | Title |
Patent | Priority | Assignee | Title |
11586385, | May 06 2020 | RADIAN MEMORY SYSTEMS LLC | Techniques for managing writes in nonvolatile memory |
20220188020, | |||
20220214808, | |||
20220269434, | |||
20220269440, | |||
20220317878, | |||
20220317879, | |||
20220404966, | |||
20240094903, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Mar 10 2023 | JOU, YEN-YU | SILICON MOTION, INC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 063027 | /0924 | |
Mar 14 2023 | LAI, KUN-CHENG | SILICON MOTION, INC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 063027 | /0924 | |
Mar 20 2023 | Silicon Motion, Inc. | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Mar 20 2023 | BIG: Entity status set to Undiscounted (note the period is included in the code). |
Date | Maintenance Schedule |
Dec 03 2027 | 4 years fee payment window open |
Jun 03 2028 | 6 months grace period start (w surcharge) |
Dec 03 2028 | patent expiry (for year 4) |
Dec 03 2030 | 2 years to revive unintentionally abandoned end. (for year 4) |
Dec 03 2031 | 8 years fee payment window open |
Jun 03 2032 | 6 months grace period start (w surcharge) |
Dec 03 2032 | patent expiry (for year 8) |
Dec 03 2034 | 2 years to revive unintentionally abandoned end. (for year 8) |
Dec 03 2035 | 12 years fee payment window open |
Jun 03 2036 | 6 months grace period start (w surcharge) |
Dec 03 2036 | patent expiry (for year 12) |
Dec 03 2038 | 2 years to revive unintentionally abandoned end. (for year 12) |