CN-122003671-A - Host management of write buffer size for flash memory
Abstract
A host device includes a Host Controller Interface (HCI) configured to be coupled to a Flash Memory Device (FMD). The HCI is configured to obtain an indication that a particular Write Buffer (WB) of the FMD is to be increased in size. The FMD includes a plurality of memory resources including a plurality of Logical Units (LUs) and at least a particular WB. The HCI is further configured to select a particular memory resource for write buffer reallocation based at least in part on a particular usage metric of the particular memory resource.
Inventors
- S. R. Akawalan
- C. Baras Sivarma
- SRIVASTAVA PUNIT
- S. J.V. Gadiraju
Assignees
- 高通股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20240726
- Priority Date
- 20231005
Claims (20)
- 1. A host device, the host device comprising: a Host Controller Interface (HCI) configured to be coupled to a Flash Memory Device (FMD) and configured to: obtaining an indication that a size of a particular Write Buffer (WB) of the FMD is to be increased, the FMD comprising a plurality of memory resources including a plurality of Logical Units (LUs) and at least the particular WB, and The particular memory resource is selected based at least in part on a particular usage metric for the particular memory resource for write buffer reallocation.
- 2. The host device of claim 1, wherein the HCI is configured to, based on obtaining the indication: obtaining usage metrics for the plurality of LU; Selecting a particular LU as the particular memory resource for write buffer allocation based on the usage metric, and And reassigning a portion of the particular LU to the particular WB.
- 3. The host device of claim 2, wherein the HCI is configured to reassign the portion of the particular LU comprising tertiary unit (TLC) memory to the particular WB comprising single-level unit (SLC) memory.
- 4. The host device of claim 2, wherein the HCI is configured to maintain the usage metric during operation of the FMD, and wherein the usage metric comprises a utilization metric, an availability metric, or both, of the plurality of LU.
- 5. The host device of claim 2, wherein the HCI is configured to: Generating a resizing measure for the plurality of LUs based on the usage measure, and The particular LU is selected having a particular resizing metric indicating the lowest usage of the plurality of LU.
- 6. The host device of claim 5, wherein the particular resizing metric is based on an availability metric, a utilization metric, or both of the particular LU.
- 7. The host device of claim 6, wherein the availability metric corresponds to unused storage capacity of the particular LU.
- 8. The host device of claim 6, wherein the utilization metric is based on a data access count at the particular LU.
- 9. The host device of claim 6, wherein the particular resizing metric corresponds to a weighted sum of the availability metric and the utilization metric.
- 10. The host device of claim 1, wherein the HCI is configured to, based on obtaining the indication: obtaining a buffer usage metric for a plurality of WB's of the FMD, wherein the buffer usage metric is maintained at the FMD; selecting a first WB as the particular memory resource for write buffer allocation based on the buffer usage metric, and A portion of the first WB is reassigned to the particular WB.
- 11. The host device of claim 10, wherein the HCI is configured to select the first WB having a first buffer usage metric indicating a lowest usage of the plurality of WB.
- 12. The host device of claim 11, wherein the first buffer usage metric indicates a full buffer detection count of the first WB.
- 13. The host device of claim 1, wherein the HCI is configured to deallocate a portion of a second particular WB based on obtaining a second indication that the size of the second particular WB is to be reduced.
- 14. The host device of claim 1, wherein the HCI is configured to obtain the indication based on a comparison of a buffer usage metric of the particular WB to one or more thresholds.
- 15. The host device of claim 14, wherein the buffer usage metric comprises a full buffer detection count for the particular WB.
- 16. The host device of claim 14, wherein the one or more thresholds comprise an upper limit, a lower limit, or both.
- 17. The host device of claim 1, wherein the HCI is configured to: transmitting a buffer usage request to the FMD; receiving a buffer usage metric for the particular WB from the FMD in response to the buffer usage request, and The indication is generated based on a comparison of the buffer usage metric at the HCI to one or more thresholds.
- 18. The host device of claim 17, wherein the buffer usage request comprises a write enhancer buffer full count ALL READ instruction to retrieve a buffer usage metric for each WB of the FMD.
- 19. The host device of claim 1, wherein the HCI is configured to obtain the indication based on an exception triggered based on a comparison of a buffer usage metric of the particular WB buffer at the FMD to one or more thresholds.
- 20. The host device of claim 19, wherein the one or more thresholds are stored at registers of the FMD.
Description
Host management of write buffer size for flash memory Cross Reference to Related Applications The present application claims the benefit of priority from commonly owned U.S. non-provisional patent application Ser. No. 18/481,616, filed on 5/10/2023, the contents of which are expressly incorporated herein by reference in their entirety. Technical Field The present disclosure relates generally to host management of write buffer sizes for flash memory devices. Background Technological advances have led to smaller and more powerful computing devices. For example, there are currently a wide variety of portable personal computing devices, including wireless telephones (such as mobile and smart phones, tablet computers, and laptop computers) that are small, lightweight, and easy for users to carry. These devices may communicate voice and data packets over a wireless network. In addition, many such devices incorporate additional functionality, such as digital still cameras, digital video cameras, digital recorders, and audio file players. Further, such devices may process executable instructions, including software applications, such as web browser applications that may be used to access the internet. As such, these devices may include significant computing capabilities. Such computing devices often incorporate functionality to operate as a host device so that data may be stored and retrieved from a flash memory device. For example, the host device may store audio, images, video, documents, etc. on the flash memory device. The flash memory device may use the write buffer as a temporary storage area for incoming data writes from the host device prior to writing the data to the main memory unit. The use of a write buffer has various advantages, such as reducing the write latency perceived by the host device. When the write buffer is small, the write buffer may generally become unusable as it is filled to capacity, and the data is refreshed to the main memory cell. On the other hand, a larger write buffer occupies more memory that would otherwise be available as main memory. The usage of the write buffer changes dynamically, so the fixed-size write buffer may be too small when larger or frequent writes are being performed, and may be too large when fewer and smaller writes are being performed. Disclosure of Invention According to one implementation of the present disclosure, a host device includes a Host Controller Interface (HCI) configured to be coupled to a Flash Memory Device (FMD) and configured to obtain an indication that a particular Write Buffer (WB) of the FMD is to be increased in size. The FMD includes a plurality of memory resources including a plurality of Logical Units (LUs) and at least the particular WB. The HCI is further configured to select a particular memory resource for write buffer reallocation based at least in part on a particular usage metric of the particular memory resource. According to another implementation of the present disclosure, a method includes obtaining, at a Host Controller Interface (HCI), an indication that a size of a particular Write Buffer (WB) of a Flash Memory Device (FMD) is to be increased. The FMD includes a plurality of memory resources including a plurality of Logical Units (LUs) and at least the particular WB. The method also includes selecting, at the HCI, a particular memory resource for write buffer reallocation based at least in part on a particular usage metric of the particular memory resource. According to another implementation of the present disclosure, a non-transitory computer-readable medium is configured to store instructions that, when executed by one or more processors, cause the one or more processors to obtain, at a Host Controller Interface (HCI), an indication that a size of a particular Write Buffer (WB) of a Flash Memory Device (FMD) is to be increased. The FMD includes a plurality of memory resources including a plurality of Logical Units (LUs) and at least the particular WB. The instructions also cause the one or more processors to select a particular memory resource for write buffer reallocation based at least in part on a particular usage metric of the particular memory resource. According to another implementation of the disclosure, an apparatus includes means for obtaining, at a Host Controller Interface (HCI), an indication that a size of a particular Write Buffer (WB) of a Flash Memory Device (FMD) is to be increased. The FMD includes a plurality of memory resources including a plurality of Logical Units (LUs) and at least the particular WB. The apparatus also includes means for selecting a particular memory resource for write buffer reallocation based at least in part on a particular usage metric of the particular memory resource. Other aspects, advantages, and features of the present disclosure will become apparent after review of the entire application, including the brief description of the drawings, detailed description of the inve