CN-122018775-A - Memory device and method of operating the same
Abstract
The present disclosure relates to a data storage device and a method of operating the same, which may include a memory device and a controller. The memory device may include a compressed memory area in which data is stored in a compressed state and an uncompressed memory area in which data is stored in an uncompressed state. The controller may receive a speculative memory read command from the host indicating that target data corresponding to a target logical address is likely to be read, search for whether a location of the target data stored in the memory device is a compressed memory region or an uncompressed memory region in response to receiving the speculative memory read command, and determine whether to store the target data in a cache configured to store data read from the memory device based on whether the location of the target data stored in the memory device is a compressed memory region or an uncompressed memory region.
Inventors
- JIN TAIHE
- Jin Zhilie
Assignees
- 爱思开海力士有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20250512
- Priority Date
- 20241111
Claims (20)
- 1. A data storage device, comprising: The memory device includes a compressed memory area for storing data in a compressed state, an uncompressed memory area for storing data in an uncompressed state, and The memory device includes a memory device, a controller in communication with the memory device to control the memory device and to receive a speculative memory read command from a host, the speculative memory read command indicating a likelihood that target data in the memory device corresponding to a target logical address will be read, to determine whether a location of the target data stored in the memory device is the compressed memory region or the uncompressed memory region in response to receiving the speculative memory read command, and to determine whether to store target data from the memory device in a cache based on whether the location of the target data stored in the memory device is the compressed memory region or the uncompressed memory region.
- 2. The data storage device of claim 1, wherein, The controller determines whether a compressed map entry corresponding to the target logical address exists in a compressed map table including a plurality of compressed map entries, and Each of the plurality of compressed map entries indicates a mapping relationship between a logical address and a physical address in the compressed memory region.
- 3. The data storage device of claim 2, wherein the controller: Determining that the target data is stored in the compressed memory area when a compressed mapping entry corresponding to the target logical address is successfully searched in the compressed mapping table, and And when the compression mapping table does not search for the compression mapping entry corresponding to the target logical address, determining that the target data is stored in the non-compression memory area.
- 4. The data storage device of claim 2, wherein, Upon determining that there is a compressed map entry corresponding to the target logical address, the controller stores the compressed map entry corresponding to the target logical address in the cache.
- 5. The data storage device of claim 1, wherein, The controller stores the target data in the cache when it is determined that the target data is stored in the uncompressed memory area.
- 6. The data storage device of claim 5, wherein, The cache includes a first sub-cache that temporarily stores data from the non-compressed memory region and a second sub-cache that temporarily stores data from the compressed memory region, and The controller stores the target data in the first sub-cache.
- 7. The data storage device of claim 4, wherein, Upon determining that the target data is stored in the compressed memory area, the controller stores the target data in the cache using a compressed map entry stored in the cache corresponding to the target logical address in response to a read command for the target data received from the host.
- 8. The data storage device of claim 7, wherein, The cache includes a first sub-cache that caches data stored in the uncompressed memory region and a second sub-cache that caches data stored in the compressed memory region, an The controller stores the target data in the second sub-cache.
- 9. The data storage device of claim 1, wherein, Upon determining that the target data is stored in the compressed memory area, the controller determines whether to store the target data in the cache based on a size of the target data compressed in the compressed memory area.
- 10. The data storage device of claim 9, wherein the controller: storing the target data in the cache upon determining that the compressed size of the target data is less than a threshold size, and When the compression size of the target data is determined to be equal to or larger than the threshold size, the target data is prevented from being stored in the cache.
- 11. A method of operating a data storage device, comprising: Receiving a speculative memory read command from a host, the speculative memory read command indicating a likelihood that target data corresponding to a target logical address will be read; determining a location where the target data is stored in a memory device comprising a compressed memory area where data is stored in a compressed state and an uncompressed memory area where data is stored in an uncompressed state, and Based on whether the location where the target data is stored in the memory device is the compressed memory region or the uncompressed memory region, it is determined whether to store the target data in a cache that stores data read from the memory device.
- 12. The method of claim 11, wherein, Determining a location in the memory device where the target data is stored includes determining whether a compressed map entry corresponding to the target logical address exists in a compressed map table comprising a plurality of compressed map entries, and Each of the plurality of compressed map entries indicates a mapping relationship between a logical address and a physical address in the compressed memory region.
- 13. The method of claim 12, wherein determining the location at which the target data is stored in the memory device comprises: Determining that the target data is stored in the compressed memory area when a compressed mapping entry corresponding to the target logical address is successfully searched in the compressed mapping table, and And when the compression mapping table does not search for the compression mapping entry corresponding to the target logical address, determining that the target data is stored in the non-compression memory area.
- 14. The method of claim 12, further comprising: upon determining that there is a compressed map entry corresponding to the target logical address, storing the compressed map entry corresponding to the target logical address in the cache.
- 15. The method of claim 11, further comprising: Upon determining that the target data is stored in the uncompressed memory region, the target data is stored in the cache.
- 16. A computing high speed link device, CXL device, comprising: a memory device including a compressed memory area where data is stored in a compressed state and an uncompressed memory area where data is stored in an uncompressed state, and The CXL controller is in communication with the memory device and receives a speculative memory read command from a host over a CXL interface, the speculative memory read command indicating a likelihood that target data corresponding to a target logical address will be read, determines whether a location of the target data stored in the memory device is the compressed memory region or the uncompressed memory region in response to receiving the speculative memory read command, and determines whether to store the target data in a cache storing data read from the memory device based on whether the location of the target data stored in the memory device is the compressed memory region or the uncompressed memory region.
- 17. The CXL device of claim 16, wherein, The CXL controller determining whether a compressed map entry corresponding to the target logical address exists in a compressed map table comprising a plurality of compressed map entries, and Each of the plurality of compressed map entries indicates a mapping relationship between a logical address and a physical address in the compressed memory region.
- 18. A CXL apparatus according to claim 17, wherein the CXL controller: Determining that the target data is stored in the compressed memory area when a compressed mapping entry corresponding to the target logical address is successfully searched in the compressed mapping table, and And when the compression mapping table does not search for the compression mapping entry corresponding to the target logical address, determining that the target data is stored in the non-compression memory area.
- 19. The CXL device of claim 17, wherein, Upon determining that there is a compressed map entry corresponding to the target logical address, the CXL controller stores the compressed map entry corresponding to the target logical address in the cache.
- 20. The CXL device of claim 16, wherein, Upon determining that the target data is stored in the uncompressed memory region, the CXL controller stores the target data in the cache.
Description
Memory device and method of operating the same Cross Reference to Related Applications The present application claims priority and benefit from korean patent application No. 10-2024-0158774 filed 11 at 2024, 11 and 11, which is incorporated herein by reference in its entirety. Technical Field Various embodiments of the disclosed technology relate to a data storage device and a method for operating a data storage device. Background The storage device is used to store data based on a request from an external device such as a computer, a mobile device (e.g., a smart phone or tablet computer), and the like. The memory device may include a memory device for data storage and a controller for managing the memory device. The memory device may be a volatile memory device or a nonvolatile memory device. The controller may receive a command from an external device (e.g., a host) and perform an operation, such as reading data, writing data, or erasing data, in the memory device based on the received command. In order to more efficiently utilize the memory device, the memory device may compress the data prior to storing the data in memory. Disclosure of Invention The disclosed technology may be implemented in some embodiments to provide a data storage device and a method of operating the same, which are designed to prevent a decrease in cache hit rate and a deterioration in read performance due to decompressing low-usage data and storing the decompressed data in a cache. In one aspect, a storage device may include a memory device including a compressed memory region in which data is stored in a compressed state and an uncompressed memory region in which data is stored in an uncompressed state (e.g., in which data is stored in an original size), and a controller configured to receive a speculative memory read command from a host indicating that target data corresponding to a target logical address has a likelihood that it will be read (e.g., the likelihood that target data corresponding to the target logical address will be read is greater than a reference likelihood value), determine, in response to receiving the speculative memory read command, whether a location in the memory device where the target data is stored is the compressed memory region or the uncompressed memory region, and determine whether to store the target data in a cache based on whether the location in the memory device where the target data is stored is the compressed memory region or the uncompressed memory region, the cache configured to store the data read from the memory device. In another aspect, a method for operating a memory device may include receiving a speculative memory read command from a host indicating that target data corresponding to a target logical address has a likelihood that will be read (e.g., the likelihood that target data corresponding to the target logical address will be read is greater than a reference likelihood value), determining a location where the target data is stored in the memory device, the memory device including a compressed memory region where data is stored in a compressed state and a non-compressed memory region where data is stored in a non-compressed state (e.g., the data is stored in an original size), and determining whether to store the target data in a cache based on whether the location where the target data is stored in the memory device is the compressed memory region or the non-compressed memory region, the cache configured to store the data read from the memory device. In another aspect, a computing high-speed link (CXL) device may include a memory device including a compressed memory region in which data is stored in a compressed state and a non-compressed memory region in which data is stored in a non-compressed state (e.g., data is stored in an original size), and a CXL controller configured to receive a speculative memory read command from a host over a CXL interface, the speculative memory read command indicating that target data corresponding to a target logical address has a likelihood that it will be read (e.g., the likelihood that target data corresponding to the target logical address will be read is greater than a reference likelihood value), determine, in response to receiving the speculative memory read command, whether a location in the memory device where the target data is stored is a compressed memory region or a non-compressed memory region, and determine whether to store the target data in a cache based on whether the region in the memory device is a compressed memory region or a non-compressed memory region, the cache configured to store the target data read from the memory device. In some embodiments of the disclosed technology, a data storage device and a method of operating the same may prevent a decrease in cache hit rate and a deterioration in read performance due to decompressing low-usage data and storing the decompressed data in a cache. Drawings Fig. 1 is a schematic