Methods and apparatus for accessing data in versions of memory pages
By tracking valid data in invalid pages within the memory system and utilizing invalid page mapping and caching schemes, the latency problem caused by the inability to access valid pages in a timely manner is solved, resulting in faster data reading.
Patent Information
- Application Number
- CN202310987558.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-11-14
- Filing Date
- 2023-08-07
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-08-07
AI Technical Summary
Existing memory systems may experience delays when accessing valid pages of memory due to erase operations or high load conditions, making it difficult to read data efficiently.
By tracking valid data in invalid pages within the memory system, and utilizing invalid page mapping data structures and caching schemes, data can be read directly from invalid pages, avoiding the need to wait for valid pages to become accessible.
It reduces data access latency and improves the response speed of the memory system, especially when valid pages are not available in time, ensuring fast data reading.
Smart Images

Figure CN117609105B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates generally to memory systems, and more particularly to systems, methods, and apparatus for accessing data in versions of memory pages. Background Technology
[0002] Memory systems may include different types of memory (such as volatile memory and / or non-volatile memory). Volatile memory may be configured as a memory cache to provide relatively fast access to data and / or store data that can be accessed relatively frequently. Data stored in the cache may also be stored in main memory, which may be implemented, for example, with non-volatile memory that can retain data across power cycles.
[0003] The information disclosed above in this background section is only intended to enhance the understanding of the background of the inventive principles, and therefore may contain information that does not constitute prior art. Summary of the Invention
[0004] An apparatus may include: at least one memory; and at least one processor configured to: determine the accessibility of a first version of a page, wherein the first version of the page is stored in the at least one memory, and based on the accessibility of the first version of the page, perform access to at least a portion of a second version of the page, wherein the second version of the page is stored in the at least one memory. The accessibility of the first version of the page may be based on an erase operation of the first version of the page. The accessibility of the first version of the page may be based on the number of times the first version of the page has been accessed. The accessibility of the first version of the page may also be based on the number of times the second version of the page has been accessed. Access to the at least a portion of the second version of the page may include access to cache lines of the second version of the page. Access to the at least a portion of the second version of the page may be based on the modification state of the first version of the page. Access to the at least a portion of the second version of the page may include access to a portion of the second version of the page, and the modification state of the first version of the page may be based on the modification state of a portion of the first version of the page corresponding to the portion of the second version of the page. The portion of the first version of the page may include cache lines of the first version of the page, and the portion of the second version of the page may include cache lines of the second version of the page corresponding to cache lines of the first version of the page. The at least one processor may be configured to: track the modification state of the at least a portion of the second version of the page. Access to at least a portion of the second version of a page may include a read operation. The at least one processor may be configured to: store the first version of the page in a first superblock; and store the second version of the page in a second superblock. The method may further include: a cache configured to store the first version of the page, wherein the at least one processor may be configured to track the modification state of the first version of the page. The at least one processor may be configured to: evict the first version of the page based on the modification state of the first version of the page. The device may include a storage means, and the at least one memory may include at least one storage medium. The storage means may be configured to operate in a consistent memory mode.
[0005] A method may include: determining the accessibility of a first version of a page, wherein the first version of the page may be stored in at least one memory; and accessing at least a portion of a second version of the page based on the accessibility of the first version of the page, wherein the second version of the page may be stored in the at least one memory. The method may further include: determining a modification state of a portion of the first version of the page, wherein the step of accessing the at least a portion of the second version of the page may include: accessing the portion of the second version of the page corresponding to the portion of the first version of the page.
[0006] An apparatus may include: at least one memory; and at least one processor configured to: store a first version of a page in the at least one memory, store a second version of the page in the at least one memory, and track the modification state of at least a portion of the first version of the page. The modification state of the at least a portion of the first version of the page may include the modification state of a portion of the first version of the page. The portion of the first version of the page may include cache lines. Attached Figure Description
[0007] The accompanying drawings are not necessarily drawn to scale, and throughout the drawings, elements of similar structure or function may generally be indicated by similar reference numerals or portions thereof for illustrative purposes. The drawings are intended only to facilitate the description of the various embodiments described herein. The drawings do not depict every aspect of the teachings disclosed herein and do not limit the scope of the claims. To prevent the drawings from becoming unclear, not all components, connections, etc., may be shown, and not all components may have reference numerals. However, the pattern of component configuration may be readily apparent from the drawings. The drawings, together with the description, illustrate exemplary embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0008] Figure 1 An embodiment of a memory device according to a disclosed example embodiment is shown.
[0009] Figure 2 An embodiment of a memory access scheme according to a disclosed example embodiment is shown.
[0010] Figure 3 An embodiment of a data cache according to a disclosed example embodiment is shown.
[0011] Figure 4 An embodiment of a buffer page update table is shown according to a disclosed example embodiment.
[0012] Figure 5 An embodiment of an invalid page mapping table according to a disclosed example embodiment is shown.
[0013] Figure 6A An example embodiment of a memory device is shown in a first state associated with a write operation, according to a disclosed example embodiment.
[0014] Figure 6B This illustrates a second state related to a write operation according to a disclosed example embodiment. Figure 6A Example embodiments of the memory device are shown in the figure.
[0015] Figure 7 An example embodiment of a method for a write operation for memory device operation according to a disclosed example embodiment is shown.
[0016] Figure 8A An example embodiment of a memory device in a first state related to an eviction operation, according to a disclosed example embodiment, is shown.
[0017] Figure 8B This illustrates a second state related to the expulsion operation according to a disclosed example embodiment. Figure 8A Example embodiments of the memory device are shown in the figure.
[0018] Figure 9 An example embodiment of a method for an eviction operation for memory device operation, according to a disclosed example embodiment, is shown.
[0019] Figure 10A An example embodiment of a memory device is shown in a first state related to a read operation, according to a disclosed example embodiment.
[0020] Figure 10B This illustrates a second state related to a read operation according to a disclosed example embodiment. Figure 10A Example embodiments of the memory device are shown in the figure.
[0021] Figure 11 An example embodiment of a method for a read operation for memory device operation according to a disclosed example embodiment is shown.
[0022] Figure 12A An example embodiment of a memory device is shown in a first state related to a garbage collection operation, according to a disclosed example embodiment.
[0023] Figure 12B This illustrates a second state related to waste collection operations according to a disclosed example embodiment. Figure 12A Example embodiments of the memory device are shown in the figure.
[0024] Figure 13 An example embodiment of a memory device having pages arranged in a superblock is shown, according to a disclosed example embodiment.
[0025] Figure 14 An example embodiment of a device according to a disclosed example embodiment is shown.
[0026] Figure 15 An embodiment of a method for accessing a page, according to a disclosed example embodiment, is shown. Detailed Implementation
[0027] Memory systems can store multiple versions of pages of data. For example, some memory systems store data in non-volatile memory, which can be accessed (e.g., written to or read from) pages. However, non-volatile memory can be erased in larger units, blocks that may include multiple pages. To modify a portion of a page of data stored in non-volatile memory, the memory system can write the updated page of data (which may include both modified and unmodified portions) to a new page in the non-volatile memory. The updated page of data (and / or the new page in the non-volatile memory where the data can be stored) is referred to as a valid page. The original page of data (and / or the original page in the non-volatile memory where the data can be stored) is referred to as an invalid page. For example, when the block containing an invalid page is filled with invalid pages, the invalid page may be marked for final erasure. Therefore, the memory system may at least temporarily store two different versions of a page of data: an invalid version (e.g., the original or earlier version) that may include at least some invalid data (e.g., data that has been modified in the corresponding updated version of the page), and a valid version (e.g., the newer or later version) that may include only valid data (or data that is more recently updated than the invalid version).
[0028] A memory system obtains a valid version of a memory page by reading the page in which data can be stored. However, in some cases, the valid page of memory may not be readily accessible. For example, if the valid page of memory is located on a memory die (e.g., an integrated circuit (IC) chip) undergoing an erase operation, the memory system may wait until the erase operation is complete before reading the valid page. Alternatively, the memory system may suspend the erase operation to read the valid page. However, suspending the erase operation can still slow down the read operation. As another example, because the valid page of memory may be located on a busy memory die or channel with a relatively large number of pending input and / or output (I / O or IO) operations, the valid page of memory may not be readily accessible. Therefore, there may still be a relatively long latency for the memory system to read the valid page of memory.
[0029] A memory system may receive read requests for only a portion of a page of data stored in memory (e.g., non-volatile memory). If the page of data stored in memory was previously updated, resulting in an invalid version of the page still existing in memory, the requested portion of the page may still be valid in the invalid version of the page. For example, when the valid version of the page is updated and / or stored, the requested portion of the data stored in the invalid page may not have been modified in the valid version of the page.
[0030] For example, if the requested portion of the data is valid in an invalid version of the page, the memory scheme according to the disclosed example embodiment can access the requested portion of the data page from the invalid version of the page. According to the implementation details, this can reduce the amount of time involved in accessing the requested data, for example, when the corresponding valid version of the page is not easily accessible (e.g., when the valid page is stored on a busy or being erased memory die). According to the implementation details, if the target cache line has not been modified, the memory request can be quickly served without interrupting the erase operation by reading the target cache line from the invalid page.
[0031] In some embodiments, because invalid data in the invalid version of a page may correspond to a potentially modified portion of the valid version of the page even if the actual data in the invalid version of the page has not yet been changed when the valid version of the page is updated and / or stored, invalid data in the invalid version of the page may be referred to as modified data (e.g., modified cache lines). Similarly, in some embodiments, because valid data in the invalid version of a page may correspond to a potentially unmodified portion of the valid version of the page when the valid version of the page is updated and / or stored, valid data in the invalid version of the page may be referred to as unmodified data (e.g., unmodified cache lines).
[0032] Some embodiments may implement one or more schemes for tracking valid data in invalid pages. For example, an invalid page mapping data structure may map the logical page number of a valid page of data to the physical page number of an invalid version of the page. This data structure may also, for example, use a mapping of the valid portion of data in an invalid version of the page to indicate the location of valid data within that invalid version of the page.
[0033] According to the disclosed example embodiments, a scheme for accessing data in different versions of a page can be used in conjunction with a data caching scheme. For example, a valid version of a page of data may initially be stored in both a cache and main memory (e.g., non-volatile memory). In a write-back configuration, modified data may be written to the version of the page in the cache, and the cache page tracking data structure may be updated to indicate one or more portions of the modified version of the page in the cache compared to the version of the page stored in main memory (which may be referred to as an invalid page). When a version of a page in the cache (which may be referred to as a valid page) is removed from the cache (e.g., by eviction), the version of the page in the cache may be written to a new page in main memory. The cache page tracking data structure can be used to update an invalid page mapping data structure to track valid and invalid data in invalid versions of pages in main memory.
[0034] In a write-through configuration, modified data can be written to a page in the cache, or to a new page in main memory. Therefore, a valid version of the page containing the modified data can be stored in both the cache and main memory. If an earlier version of the page exists in main memory, the invalid page mapping data structure can be updated to indicate that one or more portions of the valid version of the page (in both the cache and main memory) have been modified compared to the earlier version (which may be referred to as the invalid page).
[0035] This disclosure contains numerous inventive principles. The principles disclosed herein may have independent utility and may be embodied individually, and not every embodiment utilizes every principle. Furthermore, the principles may be embodied in various combinations, some of which may synergistically amplify some of the benefits of the individual principles.
[0036] Figure 1 An embodiment of a memory device according to a disclosed example embodiment is illustrated. The memory device 102 may include a memory 104 and a controller 106. The controller 106 may store multiple versions of pages of data in the memory 104. For example, as Figure 1 As shown, controller 106 can store a first version 110a (referred to as version A) of a page of data in memory 104. Version A may include portions 0, 1, 2, and 3 of the first version, which may include portions of the page of data, as indicated by a single diagonal shading.
[0037] The controller 106 may also store a second version 110b of the data page (referred to as version B) in the memory 104. Version B may include portions 0, 2, and 3 in which the data (or related portions thereof) may be substantially the same as the data in portions 0, 2, and 3 of version A, respectively. However, portion 1 of version B may include data that is substantially different from the data in portion 1 of version A, as shown by the diagonal crossshading. For example, version B of the data page can be created by modifying portion 1 of version A.
[0038] Controller 106 may include tracking logic 108, which can track data (e.g., data modification status) in one or more portions of data in a first version 110a (version A) and / or a second version 110b (version B) of a data page. For example, tracking logic 108 may use a data structure (e.g., a mapping table) to track which portions of the data page in version A are actually the same as the corresponding portions in version B and which portions are actually different.
[0039] Controller 106 may receive a request 112 to access (e.g., read) a portion 3 of version B of data stored in memory 104. Trace logic 108 may determine that the data in portion 3 of version A of the data page is actually the same as the data in portion 3 of version B of the data page. Therefore, controller 106 may service request 112 by accessing version A of the data page and sending portion 3 of version A (indicated as 110a-3) in response 114 to request 112.
[0040] Figure 1 The embodiments shown are not limited to any particular reason for a specific version of the page used to access data. However, in some embodiments, if version B is relatively inaccessible than version A (e.g., because version B may be located on a memory die, module, card, server, rack, etc., that may be undergoing an erase operation, experiencing relatively high traffic, experiencing a fault, power outage, etc., and therefore has relatively long latency, relatively high power consumption, relatively low bandwidth, etc.), then controller 106 and / or tracking logic 108 may access version A of the page containing data.
[0041] Figure 1 The embodiments shown are not limited to any particular order, reason, etc., of versions 110a and 110b for storing data. However, in some embodiments, memory 104 may be implemented using non-volatile memory, which can be accessed (e.g., written and / or read) in units of pages and erased in units of blocks that may include multiple pages. Version A may be an earlier version of a page of data stored in memory 104, and version B may be a later version in which portion 1 has been updated with new data. Because memory 104 can be written in units of pages, version B may be written to new pages of memory 104 to update portion 1. Therefore, version A may still exist in memory 104 at least temporarily until version A is erased, for example, by garbage collection.
[0042] Figure 1The embodiments and / or components shown are not limited to any particular form or construction. For example, in some embodiments, memory device 102, memory 104, and / or controller 106 may be implemented at least partially with one or more memory devices (such as individual or stacked memory dies based on any memory technology, e.g., integrated circuit (IC) chips) including volatile memory (such as dynamic random access memory (DRAM) and / or static random access memory (SRAM)), non-volatile memory (including flash memory, persistent memory (such as cross-grid non-volatile memory, memory with varying bulk resistance, phase-change memory (PCM), etc.) and / or any combination thereof). In some embodiments, any such memory may be located at one or more modules, cards, servers, racks, etc., or combinations thereof. Although trace logic 108 is shown as part of controller 106, trace logic 108 may be implemented partially or entirely as a separate component and / or as part of another component (such as memory 104 or any other component of memory device 102).
[0043] As another example, in some embodiments, memory device 102, memory 104, and / or controller 106 may be implemented at least partially with a storage device that may include any type of non-volatile storage medium based on, for example, solid-state media (e.g., solid-state drives (SSDs)), magnetic media (e.g., hard disk drives (HDDs)), optical media, or any combination thereof. In some embodiments, memory device 102 may be implemented at least partially with an SSD based on NAND flash memory, persistent memory, or any combination thereof. Any such storage device may be implemented using any connector configuration (e.g., SATA, SCSI, SAS, U.2, M.2, etc.) in any form factor (e.g., 3.5-inch, 2.5-inch, 1.8-inch, M.2, Enterprise and Data Center SSD Form Factor (EDSFF), NF1, etc.). Any such storage device may be implemented wholly or partially using a server chassis, server rack, dataroom, data center, edge data center, mobile edge data center, and / or any combination thereof, and / or in conjunction with a server chassis, server rack, dataroom, data center, edge data center, mobile edge data center, and / or any combination thereof. In some embodiments, for example, in a host computer, server computer (e.g., compute server, storage server, network server, etc.), node (e.g., storage node, compute node, etc.), or any combination thereof, the memory device 102 may be implemented at least partially using a memory controller and / or one or more memory devices, modules, etc., located on a circuit board.
[0044] As another example, memory device 102, memory 104, and / or controller 106 may communicate using any type of wired and / or wireless communication media, interfaces, networks, interconnects, protocols, etc. These include Peripheral Component Interconnect Fast (PCIe), Non-Volatile Memory Fast (NVMe), Architectural NVMe (NVMe-oF), Compute Fast Link (CXL) and / or conformance protocols (such as CXL.mem, CXL.cache, CXL.IO, etc.), Gen-Z, Open Conformance Accelerator Processor Interface (OpenCAPI), and other protocols for acceleration. Cache Coherent Interconnect (CCIX) and other high-speed interconnects, Advanced Extensible Interface (AXI), Direct Memory Access (DMA), Remote DMA (RDMA), RDMA over Converged Ethernet (ROCE), Advanced Message Queuing Protocol (AMQP), Ethernet, Transmission Control Protocol / Internet Protocol (TCP / IP), Fibre Channel, Unlimited Bandwidth, Serial ATA (SATA), Small Computer System Interface (SCSI), Serial Attached SCSI (SAS), iWARP, any generation of wireless networks including 2G, 3G, 4G, 5G, 6G, etc., any generation of Wi-Fi, Bluetooth, Near Field Communication (NFC), etc., or any combination thereof.
[0045] For illustrative purposes, some exemplary embodiments may be described in the context of details of some exemplary implementations, such as memory devices implemented with storage devices capable of operating in memory mode. However, the inventive principles are not limited to these or any other implementation details.
[0046] Figure 2 An embodiment of a memory access scheme according to a disclosed example embodiment is shown. Figure 2 The solution shown may include a host 216, a memory 220, and a storage device 202. The storage device 202 may be implemented as follows: Figure 1 The embodiment of the memory device 102 shown is illustrated. The host 216 can communicate with the memory device 202 using a communication interface 224, which can be, for example, as described above. Figure 1 It can be implemented using any type of interconnect, network, interface, protocol, etc., as described in the embodiments shown.
[0047] Although the communication interface 224 is not limited to any particular implementation detail, it is used for the purpose of illustrating the principles of the invention. Figure 2The communication interface 224 shown can be implemented using the CXL.mem protocol via CXL interconnect. The storage device 202 can be configured to operate at least partially in memory mode (e.g., CXL cache-coherent memory mode), wherein some or all of the storage media in the storage device 202 are accessible to the host 216 as memory (e.g., storage-class memory) using the CXL.mem protocol.
[0048] The host 216 can also communicate with the memory 220 using any suitable memory interface 222. For example, if the memory 220 is implemented with DRAM, the memory interface 222 can be implemented with any version (e.g., generation) of the Double Data Rate (DDR) specification (including DDR3, DDR4, DDR5, or any other current or future version).
[0049] The host 216 may include a memory controller 218, which can implement memory schemes such as tiering, caching, and buffering of the storage media in the memory 220 and storage device 202.
[0050] Storage device 202 may include controller 206 and any type and / or amount of storage medium. For illustrative purposes, storage device 202 may include four NAND flash memory chips 226-0 to 226-3 (designated as chip 0 to chip 3) arranged in two channels 228-0 and 228-1 (designated as channel 0 and channel 1, respectively), and controller 206 may be implemented using a flash translation layer (FTL).
[0051] Controller 206 enables a memory scheme that maps logical page numbers (LPNs) to physical page numbers (PPNs). This logical-to-physical mapping allows controller 206 to implement page-based memory access (e.g., memory can be written to and / or read in units of pages) and block-based erasure (e.g., memory can be erased in units of multiple pages, such as blocks).
[0052] The memory controller 218 at host 216 may request memory access (e.g., read and / or write) of data in units such as cache lines that may be smaller than pages. Because memory can be written (e.g., programmed) to memory chips 226-0 to 226-3 in units of pages, when controller 206 updates (e.g., modifies) a portion of a page (e.g., a cache line in the page), controller 206 may write the updated page, which includes the updated portion (e.g., the modified cache line), to a new page in memory (which may be referred to as a valid page) and invalidate the previous version of the page (which may be referred to as an invalid page).
[0053] Invalid pages can be erased, for example, through garbage collection, in which a block containing one or more invalid pages (e.g., the entire block) can be erased. If the block contains any valid pages, those valid pages can be moved to a new block before the block is erased.
[0054] Controller 206 may include cache line tracking logic 208, which tracks invalid pages and / or portions of invalid pages (e.g., cache lines), which may be valid and / or invalid (e.g., unmodified and / or modified cache lines). Depending on the implementation details, cache line tracking logic 208 may enable controller 206 to access valid data within invalid pages. For example, controller 206 may store a first version 230 of the data page in chip 3. If memory controller 218 at host 216 sends a write request to controller 206 for updating data stored in a portion of page 230 (e.g., a request to modify a cache line), controller 206 may store a second version 232 of the data page (including the modified cache line) in chip 0. Therefore, the second version 232 of the page stored in chip 0 may be a valid page, and the first version 230 of the page stored in chip 3 may be an invalid page. The cache line tracing logic 208 can trace (e.g., using a tracing data structure) which parts (e.g., cache lines) of the first version 230 of a page and / or the second version 232 of a page are valid and / or invalid (e.g., which cache lines have not been modified and / or have been modified).
[0055] The memory controller 218 at host 216 can send a read request to controller 206 to read a portion 234 (e.g., a cache line) of the valid page 232 stored in chip 0. If the valid page 232 is readily accessible, controller 206 can read the portion 234 of the valid page 232 from chip 0 and send the portion 234 with a response to memory controller 218. However, in some cases, the valid page 232 may not be readily accessible. For example, the valid page 232 and / or chip 0 may be relatively busy with I / O requests, or as... Figure 2 The chip 0 shown may be undergoing an erase operation (e.g., as part of a garbage collection operation). Therefore, the controller 206 may wait for other I / O traffic and / or erase operations to complete before reading the valid page 232 from chip 0. Optionally or additionally, the controller 206 may temporarily suspend the erase operation to read the valid page 232 from chip 0 and resume the erase operation after reading the valid page; however, this still delays the reading of the valid page and other processing that may be based on the erase operation.
[0056] According to the implementation details, the cache line tracking logic 208 can determine that a portion 236 of an invalid page 230 (e.g., a first version of the page) may still contain valid data corresponding to the requested portion 234 of a valid page 232 (e.g., a second version of the page). For example, when the controller stores the updated page 232 in chip 0, the requested portion 234 may not have been updated (e.g., may not have been modified). Therefore, a portion 236 of the invalid page 230 may have the same or virtually the same data as a portion 234 of the valid page 232.
[0057] In some embodiments, instead of waiting for the valid page 232 stored in chip 0 to become more accessible, as indicated by dashed arrow 238, controller 206 and / or cache line tracking logic 208 can read a portion 236 (e.g., a cache line) of the invalid page 230 in chip 3 and send portion 236 to memory controller 218 at host 216. Depending on the implementation details, this can reduce latency, power consumption, etc., associated with responding to read requests.
[0058] Host 216 can be implemented using one or more of any type of device, such as servers (e.g., computing servers, storage servers, network servers, cloud servers, etc.), computers (e.g., workstations, personal computers, tablets, smartphones, etc.) or multiple and / or combinations thereof.
[0059] Figure 3 An embodiment of a data cache according to a disclosed example embodiment is shown. The data cache 340 may, for example, be connected to... Figure 2 The memory schemes shown are used in combination to provide a cache of data that can at least eventually be stored in a storage medium (e.g., non-volatile memory such as flash memory) of storage device 202. Data cache 340 may, for example, be in... Figure 2 It is implemented in the storage device 202 shown in the figure.
[0060] Reference Figure 3 The data cache 340 can be implemented, for example, using volatile memory (e.g., DRAM), which can be addressed at a granularity smaller than a page (e.g., bytes, cache lines, etc.). Figure 3 As shown, data stored in data cache 340 can be organized into logical pages, which can be identified by logical page numbers (such as LPN1, LPN2, LPN5, and / or LPN10). A page may include one or more cache lines indicated by an index in the left column of the page.
[0061] The version of the data contained in a cache line is indicated by the shading in the right column of the cache line. Figure 3In the example shown, a single diagonal shading may indicate a first version of data, such as data that already exists in a cache line when the page is first loaded into data cache 340. Additionally or alternatively, the first version of data indicated by the single diagonal shading may indicate data that existed in the page when it was last saved to non-volatile memory (e.g., in the storage medium of a storage device).
[0062] Modified cache lines (e.g., cache lines containing a second version of data (e.g., a later version of the data)) can be indicated by diagonal crosshairs. For example, a cache line can be indicated as modified if new data has been written to it since the page was first loaded, since the page was last stored in non-volatile memory, etc. Figure 3 In the embodiment shown, in the page indicated as LPN2, cache lines 00, 02 and / or 03 may include unmodified data, and cache lines 01 and / or 7F may include modified data.
[0063] Figure 3 The pages and cache lines shown are not limited to any particular implementation details (such as the number and / or size of pages, cache lines, etc.). However, for illustrative purposes, the example embodiment can be implemented with a page containing 8192 bytes, which is divided into 128 cache lines (numbered 00 to 7F) containing 64 bytes each.
[0064] Figure 4 An embodiment of a buffer page update table according to a disclosed example embodiment is shown. Buffer page update table 442 can be used, for example, to track data already stored in a data cache (such as...). Figure 3 The cache line updated in the page of the data cache 340 shown in the figure. The cache page update table 442 can be, for example, in Figure 2 The cache line tracking logic 208 shown is implemented in this embodiment. In some embodiments, the buffer page update table 442 can be used to track cache lines in the buffered data cache that are configured to utilize operations of the CXL.mem protocol.
[0065] Reference Figure 4 The buffer page update table 442 can be implemented as, for example, a hash table, and may include one or more entries (e.g., horizontal rows) corresponding to one or more pages stored in the data cache. Entries may include a page identifier (e.g., LPN) of the corresponding page in the data cache and a bitmap for recording which cache lines in the corresponding page have been modified. For example, the top row of the buffer page update table 442 may include the identifier LPN2 in the first column to indicate that it tracks modified cache lines in LPN2, and include a bitmap in subsequent columns. Figure 4In the example shown, logic 1 can indicate an unmodified cache line, and logic 0 can indicate a modified cache line. Although the cache page update table 442 is not limited to any particular implementation detail, it is applicable to... Figure 4 In the example shown, an entry may include a bitmap with 128 bits (00 to 7F), the 128 bits (00 to 7F) corresponding to Figure 3 The number of cache lines in the pages of data cache 340 is shown in the figure.
[0066] The buffer page update table 442 can be implemented using any type of memory and / or persistence scheme. For example, in some embodiments, the buffer page update table 442 can be implemented in DRAM in a storage device and can be created at runtime. In embodiments where the data cache is saved to non-volatile memory (e.g., in the event of a power failure), the buffer page update table 442 can also be saved to non-volatile memory.
[0067] For example, when a corresponding page is evicted from the data cache, the entry may be removed from the cached page update table 442. Optionally or additionally, the entry may be removed from the cached page update table 442 when the number of unmodified cache lines in the entry's bitmap falls below a threshold.
[0068] In some embodiments, the buffer page update table 442 can be used to track modified and unmodified cache lines for cached pages in a write-back cache scheme, in which updated pages may be stored in main memory (e.g., non-volatile memory) based solely on one or more specific events (such as a page being evicted from the cache, a power-off event, etc.).
[0069] Figure 5 An embodiment of an invalid page mapping table according to a disclosed example embodiment is shown. The invalid page mapping table 544 can be used, for example, to track cache lines that are still valid in invalid versions (e.g., recently invalidated pages) of pages in physical pages that can be stored in main memory (e.g., non-volatile memory), and can correspond to updated logical pages (e.g., valid pages) that can also be stored in main memory. The invalid page mapping table 544 can, for example, in… Figure 2 The cache line tracking logic 208 shown is implemented in this embodiment. In some embodiments, the invalid page map 544 can be used to track previously buffered cache lines in the data cache configured to utilize the CXL.mem protocol.
[0070] Reference Figure 5The invalid page mapping table 544 can be implemented as, for example, a hash table, and may include one or more entries (e.g., horizontal rows) corresponding to one or more physical pages (e.g., invalid pages), which can be mapped to one or more corresponding logical pages (e.g., corresponding valid pages). Thus, entries may include the page identifier (e.g., LPN) of the valid page and the page identifier (e.g., PPN) of the corresponding invalid page. Entries may also include a bitmap for recording which cache lines in the valid pages have been modified relative to the invalid pages. For example, the top row of the invalid page mapping table 544 may include the identifier LPN2 in a first column and the identifier PPN2 in a second column to indicate that the page at PPN2 may be an invalid version of the page identified as LPN2. Some embodiments may include an additional page mapping table that maps the valid version of the page identified as LPN2 to a valid version stored in another physical page. Figure 5 In the example shown, in the bitmap column of the entry in the top row (indicated by 00 to 7F), logic 1 indicates that the corresponding cache line in the valid version of the page has not been modified relative to the corresponding cache line in the invalid version of the page, therefore, the corresponding cache line in the invalid version of the page is valid. Logic 0 indicates that the corresponding cache line in the valid version of the page has been modified relative to the corresponding cache line in the invalid version of the page, therefore, the corresponding cache line in the invalid version of the page is invalid.
[0071] In some embodiments, the invalid page map 544 may record the most recently invalid physical pages (e.g., PPN2) mapped to the corresponding logical page (e.g., LPN2). In some embodiments, the invalid page map 544 may be maintained using a least recently used (LRU) strategy that removes older entries from the table. Some embodiments may limit the size of the table, for example, by removing entries for logical pages and / or physical pages in which the number of unmodified cache lines is less than a threshold. Thus, in some embodiments, the invalid page map 544 is used partially, primarily, or only for active regions of memory (which may be referred to as hot regions of memory). In some embodiments, entries may be selected for inclusion and / or removal from the invalid page map 544 based on recency of use, frequency of use, etc. In some embodiments, entries may be selected for inclusion and / or removal from the invalid page map 544 based on one or more machine learning (ML) algorithms.
[0072] Although the invalid page mapping table 544 is not limited to any particular implementation detail, in Figure 5 In the example shown, an entry may include a bitmap with 128 bits (00 to 7F), the 128 bits (00 to 7F) corresponding to Figure 3 The number of cache lines in a page of the data cache is shown in the figure. The invalid page map 544 can be implemented using any type of memory and / or persistence scheme. For example, in some embodiments, the invalid page map 544 can be implemented in volatile memory (such as DRAM in a storage device) and can be created at runtime. In embodiments where the data cache is saved to non-volatile memory (e.g., in the event of a power failure), the invalid page map 544 can also be saved to non-volatile memory.
[0073] Figure 6A An example embodiment of a memory device is shown in a first state associated with a write operation, according to a disclosed example embodiment. Figure 6B This illustrates a second state related to a write operation according to a disclosed example embodiment. Figure 6A Example embodiments of the memory device are shown in the figure. Figure 6A and Figure 6B The write operation according to the disclosed example embodiments is collectively illustrated and may be collectively and / or individually referred to as FIG. 6. The embodiments shown in FIG. 6 can be used, for example, with any device disclosed herein (including those mentioned above). Figures 1 to 5 (The device shown in the image) is used to achieve this.
[0074] Reference Figure 6A The memory device may include a host 616 and a storage device 602. The host 616 and the storage device 602 may be configured to communicate, for example, using a CXL interface, in which the storage device 602 may be configured to operate at least partially in a memory mode (e.g., CXL cache-coherent memory mode), wherein some or all of the storage media in the storage device 602 may be accessible to the host 616 as a memory using the CXL.mem protocol (e.g., storage-class memory).
[0075] Storage device 602 may include a data cache 640, a media translation layer 606, a physical layer (PHY) 646, and one or more memory chips 626-0 to 626-3 (indicated as chip 0 to chip 3) disposed in one or more channels 628_0 and 628-1 (indicated as Ch_0 and Ch_1). The data cache 640 may be implemented, for example, using volatile memory (such as DRAM) and may be configured to store pages of data that may include one or more cache lines. The media translation layer 606 may perform one or more functions related to converting data between a format received from and / or sent to the host and a format suitable for the underlying storage medium of memory channels Ch_0 and Ch_1. For example, if memory chips 626-0 to 626-3 are implemented using flash memory (e.g., NAND flash memory), then media translation layer 606 may be implemented as a flash memory translation layer. The media translation layer 606 may include a page mapping table 650, which maps the LPN of valid pages of data to the PPN of memory. The PPN of memory can use the LPN as an index to store valid pages of data. The media translation layer 606 may also include a buffered page update table 642 and / or an invalid page mapping table 644, which may be similar to those described above. Figure 4 and Figure 5 Those described. In one embodiment, the modification status of the first version of a page may be determined based on page mapping table 650, buffered page update table 642, and / or invalid page mapping table 644.
[0076] Physical layer 646 enables the physical interface between media conversion layer 606 and memory chips 626-0 to 626-3.
[0077] For illustrative purposes, the embodiment shown in Figure 6 may be illustrated using a page with six cache lines, but the inventive principles are not limited to these or any other implementation details. In the embodiment shown herein, cache lines and / or pages shown with the same type of shading (e.g., single diagonal shading, diagonal cross shading, vertical and horizontal cross shading, etc.) may include the same or similar versions of data.
[0078] Figure 6A This shows the initial state of the device before a write operation. Figure 6B This shows the device's state after a write operation. (See reference...) Figure 6AA first version of a page of data indicated as LPN2 can be stored in data cache 640. LPN2 can include six cache lines indicated as 0 to 5. The six cache lines can include the first version of the data as indicated by a single diagonal shading. The first version of a page of data indicated as LPN2 can also be stored in a physical page in chip 3 indicated as PPN2. Therefore, in the initial state before a write operation, page mapping table 650 can include entries that can map LPN2 to PPN2. In this example, an invalid version of LPN2 may not exist stored in storage device 602, therefore, invalid page mapping table 644 may not have an entry for LPN2.
[0079] Because the page indicating data as LPN2 is stored in data cache 640, the buffer page update table 642 may include an entry for LPN2. Since the version of the page indicating data as LPN2 in data cache 640 has been written to the cache, or because the version of the page indicating data as LPN2 in data cache 640 has been stored in chip 3, the version of the page indicating data as LPN2 in data cache 640 may not yet have been updated. Therefore, in the initial state before a write operation, the bitmap for LPN2 in the buffer page update table 642 may include all 1s to indicate that no cache line has been modified.
[0080] In addition, in the initial state prior to a write operation, host 616 may include cache line 648 with updated data shown in diagonal crossshading, which the host may send to storage device 602 to modify cache line 1 of LPN2 (which may be referred to as the target cache line).
[0081] A write operation may include any number of the following operations, indicated as operations (1) through (6). Operation numbers are provided for the purpose of identifying the operations and do not necessarily indicate the order in which the operations can be performed. Therefore, in some embodiments, the order of operations may be changed, one or more operations may be omitted, and one or more additional operations may be included. Furthermore, although regarding… Figure 6A and Figure 6B One or more of the described operations may be described as being performed by the media conversion layer 606, but in some embodiments, one or more of the operations may be performed by any other device (such as a storage device controller, communication interface, NVMe controller, etc.).
[0082] (1) Host 616 can send write requests and updated cache line 1 of LPN2 to storage device 602. Figure 6AIn the example shown, page LPN2 already exists in data cache 640, which can be referred to as a cache hit. Alternatively, if LPN2 does not exist in data cache 640 (which can be referred to as a cache miss), the buffer page update table 642 may not include an entry for LPN2. In the case of a cache miss, media translation layer 606 may search page mapping table 650 to find the physical page corresponding to LPN2 (PPN2 in this example). Media translation layer 606 may read physical page PPN2 from storage medium (chip 3 in this example), load the page into data cache 640, and place an entry for LPN2 in buffer page update table 642.
[0083] (2) Figure 6B As shown, the media conversion layer 606 can write updated cache line 1 data (shown by diagonal cross shading) into cache line 1 of LPN2 in the data cache 640.
[0084] (3) The media conversion layer 606 can be cleared (e.g., changed to logic 0). Figure 6B The bit in the bitmap portion of the LPN2 entry in the buffer page update table 642 shown corresponds to cache line 1, indicating that cache line 1 is a modified cache line.
[0085] (4) The media translation layer 606 may write the updated valid page LPN2, including the modified cache line 1 (as indicated by the diagonal cross shading), to the new physical page (e.g., as shown in the image). Figure 6B The chip 0 shown is in PPN4).
[0086] (5) The media conversion layer 606 can search the page mapping table 650 to determine whether the page mapping table 650 includes an entry for LPN2, which may indicate that an earlier version of LPN2 is stored in the storage device 602. In this example, the presence of an entry mapping LPN2 to PPN2 indicates that an earlier version of LPN2 is stored in the PPN2 in chip 3. The earlier version of LPN2 stored in the PPN2 in chip 3 may become an invalid page, therefore, as Figure 6B As shown, the media conversion layer 606 can place an entry for LPN2 in the invalid page mapping table 644. The LPN2 entry can map LPN2 to PPN2 in the second column to indicate that PPN2 in chip 3 can become an invalid version of LPN2.
[0087] The bitmap portion of the LPN2 entry in the invalid page mapping table 644 may include a logic 0 at the location of cache line 1 to indicate that cache line 1 in PPN2 may correspond to a modified cache line 1 in the valid version of LPN2 stored in PPN4 in chip 0. Therefore, the data in cache line 1 of PPN2 in chip 3 may be invalid (e.g., by...). Figure 6B (As shown by X in the table). The bitmap portion of the LPN2 entry in the invalid page mapping table 644 may include a logic 1 at the positions of cache lines 0, 2, 3, 4 and / or 5 to indicate that these cache lines in PPN2 stored in chip 3 may correspond to unmodified cache lines in the valid version of LPN2 stored in PPN4 in chip 0. Therefore, the data in cache lines 0, 2, 3, 4 and / or 5 in PPN2 may be valid (as shown by X in the table). Figure 6B (As shown by the single diagonal shading in the image).
[0088] (6) Figure 6B As shown, the media conversion layer 606 can update the LPN2 entry in the page mapping table 650 to map LPN2 to the valid version of LPN2 stored in PPN4 in chip 0.
[0089] Therefore, in Figure 6B Following the write operation shown, a valid version of LPN2 (including the modified cache line 1) may exist in both data cache 640 and PPN4 in chip 0. Buffer page update table 642 may indicate that cache line 1 of LPN2 has been modified, page mapping table 650 may map LPN2 to a valid version of LPN2 stored in PPN4 in chip 0, and / or invalid page mapping table 644 may indicate that an invalid version of LPN2 stored in PPN2 may include valid data in cache lines 0, 2, 3, 4, and / or 5 corresponding to the unmodified cache lines of the valid version of LPN2. Depending on the implementation details, for example, if a valid version of a page having the requested cache line is not readily accessible, this allows media translation layer 606 to quickly determine that a valid version of the requested cache line is available in an invalid page.
[0090] In some embodiments, if the data cache 640 is configured for write-back operations, after operations (1) to (3) are completed, the entry for LPN2 can be removed from the page mapping table 650, and the write operation can be considered complete. The device shown in FIG6 may not take further action until, for example, LPN2 is evicted from the data cache 640, at which point the media translation layer 606 may perform one or more of operations (4) to (6) to store the evicted page in the storage medium, and if an invalid version of LPN2 is stored in the storage device 602, the location of the invalid page and / or the presence of valid data in the invalid page are tracked.
[0091] Figure 7 An example embodiment of a method for a write operation for memory device operation according to a disclosed example embodiment is shown. Figure 7 The embodiments shown can be used, for example, with any of the devices disclosed herein (including those mentioned above). Figure 1 This is achieved through the device shown in Figure 6.
[0092] Reference Figure 7 The method may begin at operation 751, in which the memory device may (e.g., from a host) receive a request to write an updated cache line to a page in the data cache. At operation 752, the method may determine whether the page with the requested cache line exists in the data cache (e.g., whether a cache hit occurs). If a cache hit occurs, the method may proceed to operation 756. However, if the page does not exist in the data cache (e.g., a cache miss occurs), the method may proceed to operation 753, in which the page with the requested cache line may be read from main memory (e.g., non-volatile memory in a storage device).
[0093] In operation 754, the method determines whether the data cache is full. If the data cache is not full, the method proceeds to operation 756. However, if the data cache is full in operation 754, the method proceeds to operation 755, where a page is evicted from the data cache. In some embodiments, a page may be selected for eviction based on an LRU policy, the number of unmodified cache lines in the page, etc. For example, in some embodiments, a page may be selected for eviction if it has a relatively low number of unmodified cache lines (e.g., the minimum number of unmodified cache lines) (which may indicate that one or more invalid pages corresponding to the selected page may include a relatively small amount of valid data). The method proceeds to operation 756.
[0094] In operation 756, the method writes the updated cache line to a page in the data cache. In operation 757, the method updates the cached page update table, for example, to indicate that the cache line for a page in the data cache has been modified. The method proceeds to operation 758, where it determines whether the data cache is configured for write-through or write-back operations. If the data cache is not configured for write-back operations, the method proceeds to operation 761.
[0095] However, if the data cache is configured for write-through operations, the method may proceed to operation 759, where the updated page in the data cache may be written to a new physical page in main memory (e.g., non-volatile memory in the storage device). In some embodiments, the page mapping table may be updated to map the LPN of the updated page to the PPN of the new valid physical page. In operation 760, the invalid page mapping table may be updated to indicate that an invalid version of the updated page may be stored in main memory, and to indicate that the cache line for the invalid version of the page corresponding to the modified cache line in the valid version of the page may contain invalid data. The method may proceed to operation 761, where the storage device may return a response (e.g., completion, error, etc.) to the host.
[0096] Figure 8A An example embodiment of a memory device in a first state related to an eviction operation, according to a disclosed example embodiment, is shown. Figure 8B This illustrates a second state related to the expulsion operation according to a disclosed example embodiment. Figure 8A Example embodiments of the memory device are shown in the figure. Figure 8A and Figure 8B The expulsion operation according to the disclosed example embodiments is collectively illustrated and may be collectively and / or individually referred to as FIG8. The embodiments shown in FIG8 can be used, for example, with any of the devices disclosed herein (including those mentioned above). Figure 1 This is achieved through the device shown in Figure 6.
[0097] In some respects, Figure 8A and Figure 8B The embodiments shown may be similar to Figure 6A and Figure 6B The embodiments shown are illustrated, and similar components may be identified using reference numerals ending with the same numbers. Therefore, Figure 8A and Figure 8BThe embodiments shown may include a host 816 and a storage device 802. The storage device 802 may include a data cache 840, a media translation layer 806, a physical layer 846, and one or more memory chips 826-0 to 826-3 (indicated as chip 0 to chip 3) arranged in one or more channels 828-0 and 828-1 (indicated as Ch 0 and Ch 1). The media translation layer 806 may include a page mapping table 850, a buffered page update table 842, and / or an invalid page mapping table 844. The page mapping table 850, the buffered page update table 842, and / or the invalid page mapping table 844 may be, for example, similar to those described above. Figure 6A and Figure 6B Those described. Furthermore, the host 816 and storage device 802 can be configured to communicate, for example, using a CXL interface, in which the storage device 802 can be configured to operate at least partially in memory mode (e.g., CXL cache-coherent memory mode), wherein some or all of the storage media in the storage device 802 can access the host 816 as memory using the CLX.mem protocol (e.g., storage-class memory).
[0098] Figure 8A This shows the initial state of the memory device before a data cache eviction operation. Figure 8B This shows the state of the memory device after a data cache evict operation. (See reference...) Figure 8A Pages of data designated as LPN2 can be stored in data cache 840. Pages of LPN2 stored in data cache 840 may include three different versions of data: cache line 0 may include a version of data indicated by a diagonal cross shading, cache line 1 may include a version of data indicated by a vertical and horizontal cross shading, and cache lines 2 to 5 may include a version of data indicated by a single diagonal shading.
[0099] Page mapping table 850 maps LPN2 to physical page PPN4 stored in chip 0. Physical page PPN4 may include different versions of the data in LPN2 stored in data cache 840. Cache lines in physical page PPN4 stored in chip 0 may include two versions of data: cache lines 0 to 1 may include versions of data indicated by vertical and horizontal cross shading, and cache lines 2 to 5 may include versions of data indicated by a single diagonal shading.
[0100] The cache page update table 842 may include entries for LPN2 with a bitmap portion indicating that cache line 0 in LPN2 can be modified relative to cache line 0 in PPN4 (indicated by logic 0), and that cache lines 1 through 5 in LPN2 can be modified relative to cache lines 1 through 5 in PPN4 (indicated by logic 1). Because PPN4 includes a cache line that has been modified relative to LPN2 (cache line 0), PPN4 may be considered an invalid page. However, because cache lines 1 through 5 in PPN4 may contain data that is essentially the same as the data in the corresponding unmodified cache lines of LPN2, cache lines 1 through 5 in PPN4 may contain valid data.
[0101] Invalid page mapping table 844 may include entries that map LPN2 to physical page PPN2 stored in chip 2. Physical page PPN2 stored in chip 2 may include three different versions of data: cache line 0 may include a version of data indicated by vertical and horizontal cross shading, cache line 1 may include a version of data indicated by dots, and cache lines 2 through 5 may include versions of data indicated by a single diagonal shading. Therefore, because cache lines 0 through 1 in PPN2 may include data that is actually different from the data in the corresponding modified cache lines 0 through 1 in LPN2, the entries for LPN2 in invalid page mapping table 844 may include a bitmap portion indicating that cache lines 0 through 1 in PPN2 may be invalid (indicated by logic 0). Therefore, PPN2 in chip 2 can be considered an invalid page. Because cache lines 2 to 5 in PPN2 may include data that is actually the same as the data in the corresponding modified cache lines 2 to 5 in LPN2 stored in data cache 840, the bitmap portion of the LPN2 entry may also indicate that cache lines 2 to 5 in PPN2 may be valid (indicated by logic 1).
[0102] For example, because page LPN2 in data cache 840 may include a cache line that has been modified relative to the most recently stored version of the page in PPN4 in chip 0 (cache line 0 in this example), page LPN2 in data cache 840 may be considered a dirty page.
[0103] Page LPN2 may be evicted, for example, to create space in data cache 840 for pages of other data. For example, page LPN2 may be selected for eviction based on an LRU policy, the number of unmodified cache lines in the page, etc. For example, in some embodiments, LPN2 may be selected for eviction because it may have a relatively low number of unmodified cache lines.
[0104] The eviction operation may include any number of the following operations, indicated as operations (1) to (6). The operation numbers are provided for the purpose of identifying the operations and do not necessarily indicate the order in which the operations can be performed. Therefore, in some embodiments, the order of the operations may be changed, one or more operations may be omitted, and one or more additional operations may be included. Furthermore, although regarding… Figure 8A and Figure 8B One or more of the operations described may be described as being performed by the media conversion layer 806, but in some embodiments, one or more of the operations may be performed by any other device (such as a storage device controller, communication interface, NVMe controller, etc.).
[0105] (1) The media conversion layer 806 can select the page of data indicated as LPN2 stored in the data cache 840 for eviction.
[0106] (2) Figure 8B As shown, the media conversion layer 806 can locate the entry for LPN2 in the invalid page mapping table 844 and update the entry to map LPN2 to the invalid physical page PPN4 in chip 0.
[0107] (3) Figure 8B As shown, the media conversion layer 806 can locate the bitmap portion of the LPN2 entry in the buffer page update table 842 and use the bitmap portion to update the bitmap portion of the LPN2 entry in the invalid page mapping table 844. Because cache line 0 in PPN4 may include data that is actually different from the data in the corresponding modified cache line 0 in LPN2, the updated bitmap portion can indicate that cache line 0 in PPN4 can be invalid (indicated by logic 0), and because cache lines 1 to 5 in PPN4 may include data that is actually the same as the data in the corresponding unmodified cache lines 1 to 5 in LPN2, cache lines 1 to 5 in PPN4 can be valid (indicated by logic 1).
[0108] (4) Figure 8B As shown, the media conversion layer 806 can evict the dirty page LPN2 from the data cache 840 by writing the dirty page LPN2 into the new physical page PPN5 in the chip 3 and removing the entry for LPN2 from the buffer page update table 842.
[0109] (5) The media conversion layer 806 can update the page mapping table 850 to map LPN2 to PPN5 in chip 3. Therefore, as Figure 8B As shown, LPN2 may no longer be mapped to physical page PPN2 in chip 2.
[0110] (6) The physical page PPN2 in chip 2 can be marked for erasure and / or garbage collection.
[0111] Therefore, in Figure 8A and Figure 8B After the eviction operation shown, the page indicating data as LPN2 can be removed from the data cache 840. The page mapping table 850 can map LPN2 to a valid version of the page stored in the physical page PPN5 in the chip 3. The invalid version of the page can be stored in the physical page PPN4 in the chip 0. The invalid page mapping table 844 can include entries that map LPN2 to the invalid page PPN4 and indicate that cache line 0 of PPN4 can contain invalid data corresponding to the modified cache line 0 in PPN5, but cache lines 1 to 5 of PPN4 can contain valid data corresponding to the unmodified cache lines 1 to 5 in PPN5.
[0112] Figure 9 An example embodiment of a method for an eviction operation for memory device operation, according to a disclosed example embodiment, is shown. Figure 9 The embodiments shown can be used, for example, with any of the devices disclosed herein (including those mentioned above). Figure 1 This is achieved using the devices shown in Figures 6 and 8.
[0113] Reference Figure 9 The method can begin at operation 962, in which the memory device can select a page to be evicted from the data cache. For example, a page may be selected if it has a relatively low number of unmodified cache lines (e.g., a minimum number of unmodified cache lines) (which may indicate that one or more invalid pages corresponding to the selected page may contain a relatively small amount of valid data), and therefore may be relatively unlikely to be used as an alternative source of valid data if the corresponding valid page is not readily accessible for read operations.
[0114] In operation 963, the method may write the evicted page to a new physical page in main memory (e.g., non-volatile memory in a storage device). In operation 964, the method may update the entry for the evicted page in the invalid page mapping table, for example, to map the LPN of the evicted page to the PPN of the invalid version of the page. The entry for the evicted page may also be updated to indicate one or more cache lines in the invalid page, which may correspond to unmodified cache lines in the evicted page, so that the entry for the evicted page may include valid data. In operation 965, the method may remove the entry for the evicted page from the cached page update table.
[0115] Figure 10A An example embodiment of a memory device is shown in a first state related to a read operation, according to a disclosed example embodiment. Figure 10B This illustrates a second state related to a read operation according to a disclosed example embodiment. Figure 10A Example embodiments of the memory device are shown in the figure. Figure 10A and Figure 10B The reading operations according to the disclosed example embodiments are collectively illustrated and may be collectively and / or individually referred to as FIG. 10. The embodiments shown in FIG. 10 can be used, for example, with any device disclosed herein (including those mentioned above). Figure 1 This is achieved through the device shown in Figure 6.
[0116] In some respects, Figure 10A and Figure 10B The embodiments shown may be similar to Figure 6A and Figure 6B The embodiments shown are illustrated, and similar components may be identified using reference numerals ending with the same numbers. Therefore, Figure 10A and 10B The embodiments shown may include a host 1016 and a storage device 1002. The storage device 1002 may include a data cache 1040, a media translation layer 1006, a physical layer 1046, and one or more memory chips 1026-0 to 1026-3 (indicated as chip 0 to chip 3) arranged in one or more channels 1028-0 and 1028-1 (indicated as Ch 0 and Ch 1). The media translation layer 1006 may include a page mapping table 1050, a buffered page update table 1042, and / or an invalid page mapping table 1044. The page mapping table 1050, the buffered page update table 1042, and / or the invalid page mapping table 1044 may be, for example, similar to those described above. Figure 6A and Figure 6B Those described. Furthermore, host 1016 and storage device 1002 may be configured to communicate, for example, using a CXL interface, in which storage device 1002 may be configured to operate at least partially in memory mode (e.g., CXL cache-coherent memory mode), wherein some or all of the storage media in storage device 1002 may be accessible to host 1016 as memory using the CLX.mem protocol (e.g., storage-class memory).
[0117] Figure 10A This shows the initial state of the memory device before a data cache eviction operation. Figure 10B This shows the state of the memory device after a data cache evict operation. (See reference...) Figure 10A Page mapping table 1050 may include entries that can map logical page LPN2 to a valid version of a page stored in physical page PPN4 in chip 0. Invalid page mapping table 1044 may include entries that can also map LPN2 to an invalid version of a page stored in physical page PPN2 in chip 3.
[0118] Because cache lines 0 and 2 through 5 in PPN2 may actually be identical to the data in the corresponding unmodified cache lines 0 and 2 through 5 in the valid version of the page in PPN4 stored in chip 0, the bitmap portion of the LPN2 entry in the invalid page map 1044 may indicate that cache lines 0 and 2 through 5 in PPN2 may include valid data (indicated by logic 1). Because cache line 1 in PPN2 may actually be different from the data in the corresponding modified cache line 1 in the valid version of the page in PPN4 stored in chip 0, the bitmap portion of the LPN2 entry in the invalid page map 1044 may also indicate that cache line 1 in PPN2 may include invalid data (indicated by logic 0). This is in Figure 10A Visually shown in Figure 10A In the diagram, cache lines 0 and 2 through 5 in both PPN2 and PPN4 are shown with versions of data indicated by a single diagonal shading, cache line 1 in PPN4 is shown with versions of data indicated by a diagonal cross shading, and cache line 1 in PPN2 is shown as invalid, indicated by an X.
[0119] The read operation may include any number of the following operations, indicated as operations (1) to operations (8). The operation numbers are provided for the purpose of identifying the operations and do not necessarily indicate the order in which the operations can be performed. Therefore, in some embodiments, the order of the operations may be changed, one or more operations may be omitted, and one or more additional operations may be included. Furthermore, although regarding… Figure 10A and Figure 10B One or more of the operations described may be described as being performed by the media conversion layer 1006, but in some embodiments, one or more of the operations may be performed by any other device (such as a storage device controller, communication interface, NVMe controller, etc.).
[0120] (1) Storage device 1002 may receive a request from host 1016 to read cache line 2 from logical page LPN2. (2) If LPN2 is stored in data cache 1040, storage device 1002 may read cache line 2 from LPN2 in data cache 1040 and send a response to host 1016 including cache line 2 from LPN2.
[0121] (3) If LPN2 is not stored in data cache 1040, media conversion layer 1006 can search page mapping table 1050 to locate the valid physical page PPN4 in chip 0 where LPN2 can be stored.
[0122] (4) Figure 10AAs shown in bounding box 1066, for example, because the chip 0 in which PPN4 can be stored may be busy with ongoing erase and / or garbage collection operations, relatively heavy I / O traffic, etc., the media conversion layer 1006 may determine that the chip 0 in which PPN4 can be stored may not be easily accessible.
[0123] (5) The media conversion layer 1006 can search for an entry for LPN2 in the invalid page mapping table 1044. An entry for LPN2 can indicate that an invalid version of LPN2 can be stored in physical page PPN2 in chip 3. The bitmap portion of the LPN2 entry in the invalid page mapping table 1044 can indicate that an invalid version of page LPN2 stored in physical page PPN2 in chip 3 may include a valid version of cache line 2 (indicated by logic 1 in the bitmap). For example, cache line 2 in PPN2 can be valid because it may correspond to an unmodified cache line 2 in the valid version of LPN2 stored in PPN4 in chip 0.
[0124] (6) (For example, because chip 3 may not be undergoing erase and / or garbage collection operations, and may not be busy with relatively heavy I / O operations, etc., the media conversion layer 1006 can determine that chip 3 is easier to access than chip 0.
[0125] (7) Figure 10B As shown, because the invalid version of page LPN2 in physical page PPN2 stored in chip 3 may include the valid version of the requested cache line 2, and chip 3 is more accessible than chip 0, the media conversion layer 1006 can read the invalid version of page LPN2 stored in physical page PPN2 stored in chip 3 and load the invalid version of page LPN2 into data cache 1040.
[0126] (8) Figure 10B As shown, storage device 1002 can read valid data in cache line 2 of LPN2 stored in data cache 1040, and send the valid data in cache line 2 of LPN2 to host 1016 in response to a read request.
[0127] Based on the implementation details, as described above... Figure 10A and Figure 10B The timely reading of valid cache lines from invalid versions of data pages, as described above, reduces the latency and / or power consumption associated with reading data from relatively inaccessible pages. Furthermore, as mentioned above... Figure 10A and Figure 10BThe timely reading of valid cache lines from invalid versions of data pages, as described, enables reading cache lines without suspending the erase operation, reducing latency for other processing of the chip being erased. Furthermore, depending on the implementation details, the techniques disclosed herein can have little or no impact on the durability, reliability, lifespan, etc., of the storage device in which it is implemented.
[0128] Figure 11 An example embodiment of a method for a read operation for memory device operation according to a disclosed example embodiment is shown. Figure 11 The embodiments shown can be used, for example, with any of the devices disclosed herein (including those mentioned above). Figure 1 This can be achieved using the devices shown in Figures 6, 8, and / or 10.
[0129] Reference Figure 11 The method may begin at operation 1168, in which the memory device may receive a read request for reading a cache line from a logical page of data. At operation 1169, the method may, for example, use a page mapping table to locate the valid physical page in which the requested cache line can be stored. At operation 1170, the method may determine whether the valid physical page in which the requested cache line is stored is busy (e.g., having erase operations, other I / O traffic, etc.). If the valid page is located on a chip that is not currently being erased, and the valid page and / or the chip in which the valid page resides is not busy with relatively high I / O traffic, the method may load the valid page into the data cache at operation 1175 and proceed to operation 1174.
[0130] However, if in operation 1170 the method determines that the chip containing the valid physical page is being erased, or that the valid page and / or the chip containing the valid page is busy with relatively high I / O traffic, the method may attempt to avoid pages undergoing erasure and / or may attempt to achieve load balancing by attempting to read the requested cache line from an invalid page that may include a valid version of the requested cache line. Therefore, the method may proceed to operation 1171, where the method determines whether an invalid version of the logical page includes a valid version of the requested cache line. If in operation 1172 the method cannot locate a valid version of the requested cache line in an invalid version of the page, the method may load the valid page into the data cache in operation 1175 and proceed to operation 1174. However, if in operation 1172 the method is able to locate a valid version of the requested cache line in an invalid version of the page, the method may load the invalid page into the data cache in operation 1173 and proceed to operation 1174.
[0131] In operation 1174, the method reads a requested cache line from a page in the data cache. The memory device may send a response to the read request to the cache line.
[0132] Figure 12A An example embodiment of a memory device is shown in a first state related to a garbage collection operation, according to a disclosed example embodiment. Figure 12B This illustrates a second state related to waste collection operations according to a disclosed example embodiment. Figure 12A Example embodiments of the memory device are shown in the figure. Figure 12A and Figure 12B The waste collection operation according to the disclosed example embodiments is collectively illustrated and may be collectively and / or individually referred to as FIG. 12. The embodiments shown in FIG. 12 can be used, for example, with any of the devices disclosed herein (including those mentioned above). Figure 1 This can be achieved using the devices shown in Figures 6, 8, and / or 10.
[0133] In some respects, Figure 12A and Figure 12B The embodiments shown may be similar to Figure 6A and Figure 6B The embodiments shown are illustrated, and similar components may be identified using reference numerals ending with the same numbers. Therefore, Figure 12A and Figure 12B The embodiments shown may include a host 1216 and a storage device 1202. The storage device 1202 may include a data cache 1240, a media translation layer 1206, a physical layer 1246, and one or more memory chips 1226-0 to 1226-3 (indicated as chip 0 to chip 3) arranged in one or more channels 1228-0 and 1228-1 (indicated as Ch 0 and Ch 1). The media translation layer 1206 may include a page mapping table 1250, a buffered page update table 1242, and / or an invalid page mapping table 1244. The page mapping table 1250, the buffered page update table 1242, and / or the invalid page mapping table 1244 may be, for example, similar to those described above. Figure 6A and Figure 6B Those described. Furthermore, host 1216 and storage device 1202 may be configured to communicate, for example, using a CXL interface, in which storage device 1202 may be configured to operate at least partially in memory mode (e.g., CXL cache-coherent memory mode), wherein some or all of the storage media in storage device 1202 may be accessible to host 1216 as memory using the CLX.mem protocol (e.g., storage-class memory).
[0134] Figure 12A This shows the initial state of the memory device before the garbage collection operation. Figure 12BThis shows the state of the memory device after a garbage collection operation. (See reference...) Figure 12A Page mapping table 1250 may include entries for LPN2, which can map logical page LPN2 to valid physical page PPN4 stored in chip 1. Invalid page mapping table 1244 can also map logical page LPN2 to invalid physical page PPN2 stored in chip 2.
[0135] In some embodiments, if any valid page is stored in chip 2, the storage device 1202 can initiate a garbage collection operation by moving the valid page to a different chip. As shown by bounding box 1266, after moving any valid page, the storage device 1202 can initiate an erase operation on chip 2. Therefore, as Figure 12B As shown, invalid page PPN2 can be erased from chip 2. Figure 12B As shown, the media conversion layer 1206 can remove the entry for PPN2 from the invalid page mapping table 1244.
[0136] Figure 13 An example embodiment of a memory device having pages arranged in a superblock, according to a disclosed example embodiment, is shown. In some aspects, Figure 13 The embodiments shown may be similar to Figure 8B The embodiments shown are illustrated, and similar components may be identified using reference numerals ending with the same numbers. However, in Figure 13 In the embodiment shown, pages in chips 0 through 3 may be arranged in superblocks designated as superblock 0 and superblock 1. Physical page PPN4 stored in chip 0 (which may be part of superblock 0) may be the latest version of page LPN2 written to non-volatile memory before being evicted from data cache 1340. When LPN2 is evicted from data cache 1340, writing a new valid page to physical page PPN5 in a different superblock on a different chip (e.g., chip 3 in superblock 1) prevents ongoing erase operations on the superblock from blocking access to one or more chips belonging to that superblock. Depending on the implementation details, this avoids or eliminates delays caused by waiting for erase operations when reading valid cache lines from invalid pages.
[0137] Any functionality described herein (including any host functionality, functional memory devices, etc. (e.g., controllers, trace logic, cache line traces, etc.)) can be implemented using hardware, software, firmware, or any combination thereof that executes instructions stored in any type of memory (including, for example, hardware and / or software combinational logic, sequential logic, timers, counters, registers, state machines, volatile memory (such as dynamic random access memory (DRAM) and / or static random access memory (SRAM)), non-volatile memory (including flash memory, persistent memory (such as cross-grid non-volatile memory), memory with varying bulk resistance, phase-change memory (PCM), etc., and / or any combination thereof), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), CPUs (including complex instruction set computer (CISC) processors (such as x86 processors) and / or reduced instruction set computer (RISC) processors (such as ARM processors)), graphics processing units (GPUs), neural processing units (NPUs), tensor processors (TPUs), etc.). In some embodiments, one or more components may be implemented as a system-on-a-chip (SOC).
[0138] Figure 14 An example embodiment of a device according to a disclosed example embodiment is shown. Figure 14 The embodiments shown can be used, for example, to implement any memory device disclosed herein. Device 1400 may include device controller 1402, trace logic 1408, device function circuitry 1406, and / or communication interface 1410. Figure 14 The components shown can communicate via one or more device buses 1412. Trace logic 1408 can be used, for example, to implement any invalid page tracing functionality disclosed herein.
[0139] Device functional circuitry 1406 may include any hardware used to implement the main functions of device 1400. For example, if device 1400 is implemented as a storage device, device functional circuitry 1406 may include storage media (such as one or more flash memory devices, FTL, etc.). As another example, if device 1400 is implemented as a network interface card (NIC), device functional circuitry 1406 may include one or more modems, network interfaces, physical layer (PHY), media access control layer (MAC), etc. As yet another example, if device 1400 is implemented as an accelerator, device functional circuitry 1406 may include one or more accelerator circuits, memory circuits, etc.
[0140] Figure 15An embodiment of a method for accessing a version of a page according to a disclosed example embodiment is shown. The method may begin at operation 1502. At operation 1504, the method may determine the accessibility of a first version of the page, wherein the first version of the page is stored in at least one memory. The accessibility of the first version of the page may be based on, for example, an erase operation of a first page (e.g., the first version of the page), the number of times the first page is accessed, the number of times a second version of the page is accessed, etc. At operation 1506, the method may access at least a portion of a second version of the page based on the accessibility of the first version of the page, wherein the second version of the page is stored in at least one memory. At least a portion of the second version of the page may include, for example, cache lines. The method may end at operation 1508.
[0141] Figure 15 The embodiments illustrated herein, as well as all other embodiments described herein, are example operations and / or components. In some embodiments, some operations and / or components may be omitted and / or other operations and / or components may be included. Furthermore, in some embodiments, the temporal and / or spatial order of operations and / or components may be changed. Although some components and / or operations may be shown as separate components and / or operations, in some embodiments, some components and / or operations shown separately may be integrated into a single component and / or operation, and / or some components and / or operations shown as single components and / or operations may be implemented using multiple components and / or operations.
[0142] Some embodiments disclosed above have been described in the context of various implementation details, but the principles of this disclosure are not limited to these or any other specific details. For example, some functions have been described as being implemented by specific components, but in other embodiments, functions may be distributed across different systems and components in different locations and with various user interfaces. Specific embodiments have been described as having specific processes, operations, etc., but these terms also include embodiments where specific processes, operations, etc. can be implemented by multiple processes, operations, etc., or embodiments where multiple processes, operations, etc. can be integrated into a single process, operation, etc. References to components or elements may refer only to a portion of a component or element. For example, a reference to a block may refer to the entire block or one or more sub-blocks. Unless otherwise clear from the context, the use of terms such as “first” and “second” in this disclosure and claims is for the purpose of distinguishing the elements they modify only and may not indicate any spatial or temporal order. In some embodiments, a reference to an element may refer to at least a portion of an element; for example, “based on” may mean “at least partially based on”, etc. A reference to a first element may not imply the presence of a second element. The principles disclosed herein have independent utility and can be embodied separately, and not every embodiment may utilize every principle. However, principles can also be embodied in various combinations, and some of these combinations can amplify the benefits of the individual principles in a synergistic way.
[0143] The various details and embodiments described above can be combined to produce additional embodiments based on the inventive principles disclosed in this patent. Since the inventive principles disclosed in this patent can be modified in arrangement and detail without departing from the inventive concept, such changes and modifications are considered to fall within the scope of the appended claims.
Claims
1. A device for accessing data in a version of a memory page, comprising: At least one non-volatile memory; as well as At least one processor is configured as follows: The accessibility of a first version of the page is determined, wherein the first version of the page is the valid version of the page, and is stored in the at least one non-volatile memory. Based on the accessibility indication of the first version of the page, which indicates that the first version of the page is not easily accessible, an access to at least a valid portion of the second version of the page is performed, wherein the second version of the page is an invalid version of the page and is stored in the at least one non-volatile memory.
2. The device according to claim 1, wherein, Accessibility of the first version of a page is based on the erase operation of the first version of the page.
3. The device according to claim 1, wherein, The accessibility of the first version of a page is based on the number of visits to the first version of the page.
4. The device according to claim 3, wherein, The accessibility of the first version of a page is further based on the number of visits to the second version of the page.
5. The device according to claim 1, wherein, Access to at least the valid portion of the second version of the page includes access to the cached lines of the second version of the page.
6. The device according to claim 1, wherein, Access to at least the valid portion of the second version of the page is based on the modification status of the first version of the page.
7. The device according to claim 6, wherein: Access to at least the valid portion of the second version of the page includes access to a portion of the second version of the page; and The modification status of the first version of the page is based on the modification status of the portion of the first version of the page corresponding to the portion of the second version of the page.
8. The device according to claim 7, wherein: The portion of the first version of the page includes the cache line of the first version of the page; and The portion of the second version of the page includes the cache line of the second version of the page corresponding to the cache line of the first version of the page.
9. The device of claim 1, wherein the at least one processor is configured to: track the modification state of at least the valid portion of the second version of the page.
10. The device according to claim 1, wherein, Access to at least the valid portion of the second version of the page includes a read operation.
11. The device according to claim 1, wherein, The at least one processor is configured to: Store the first version of the page in the first superblock; and Store the second version of the page in the second superblock.
12. The apparatus according to any one of claims 1 to 11, further comprising: A cache is configured to store a first version of a page, wherein the at least one processor is configured to track the modification state of the first version of the page.
13. The device according to claim 12, wherein, The at least one processor is configured to evict the first version of a page based on the modification state of the first version of the page.
14. The device according to any one of claims 1 to 11, wherein: The device includes a storage device; and The at least one non-volatile memory includes at least one storage medium.
15. The device according to claim 14, wherein, The storage device is configured to operate in a consistent memory mode.
Citation Information
Patent Citations
Method and system for DYNAMICALLY UPDATING CODE WITHOUT REQUIRING PROCESSES TO RESTART
CN103870300A
Method for performing data updates
CN107239229A
