Hierarchical memory system
By setting up a virtual intermediate memory area in the multi-level memory system and adjusting its size using access frequency counts and thresholds, the performance problems caused by frequent data migration in the multi-level memory system are solved, more efficient memory management is achieved, and migration overhead is reduced. and performance burden.
Patent Information
- Application Number
- CN202410396437.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-06-14
- Filing Date
- 2024-04-03
- Publication Date
- 2024-10-15
AI Technical Summary
In multi-level memory systems, repeated promotion and devolution operations caused by changes in data access patterns and migration between frequently accessed and infrequently accessed data bring performance burdens to the computing system, and existing technologies are difficult to effectively reduce this. migration overhead.
By setting up a virtual intermediate memory area in the slow memory, using access frequency counts and thresholds to dynamically adjust the size of the intermediate memory area, reducing repeated migration of data, and using virtual memory area technology to move data from the intermediate memory area to the slow memory or fast storage, by simply changing metadata without copying the data.
It effectively reduces the repeated promotion and decentralization of data, reduces the system performance burden, improves the overall performance of the memory system, and reduces migration overhead. Through adaptive intermediate memory area size adjustment, it dynamically reflects the page status and system status, optimizing The page migration decision is made.
Smart Images

Figure CN118779258A_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to and the benefit of U.S. Provisional Application No. 63 / 457,350, filed on April 5, 2023, entitled “SYSTEM AND METHOD FOR MITIGATING SWITCHING BETWEEN FAST AND SLOW MEMORY CAUSED BY WARM MEMORY PAGES IN MULTI-LEVEL MEMORY SYSTEMS,” the entire contents of which are incorporated herein by reference. Technical Field
[0003] One or more aspects of embodiments according to the present disclosure relate to a computing system, and more particularly, to a memory system for a computing system. Background Art
[0004] In a computing system, memory may be used to store instructions and data. Newly developed applications may have greater demand for memory.
[0005] Aspects of the present disclosure are related to this general technical environment. Summary of the invention
[0006] According to an embodiment of the present disclosure, a method is provided, comprising: demoting a first data page from a fast memory to a slow memory; promoting the first data page from the slow memory to an intermediate memory area; and promoting the first data page from the intermediate memory area to a fast memory, wherein the intermediate memory area includes a virtual area within the slow memory.
[0007] In some embodiments: moving the first data page from the fast memory to the slow memory includes a first moving of the first data page; and the method further includes: performing a second moving of the first data page, the second moving of the first data page including moving the first data page from the fast memory to the slow memory; and increasing the size of the intermediate memory area based on the first moving and the second moving.
[0008] In some embodiments, the method further includes: determining that a page utilization metric in the intermediate memory area is less than a threshold; and reducing a size of the intermediate memory area.
[0009] In some embodiments, the method further includes: determining that a page utilization metric in the intermediate memory area is less than a threshold; and reducing a size of the intermediate memory area, wherein reducing the size of the intermediate memory area includes promoting the second page data from the intermediate memory area to the fast memory.
[0010] In some embodiments, slow memory is managed by a system memory manager.
[0011] In some embodiments: the slow memory comprises persistent memory; and the slow memory is managed by a file system.
[0012] In some embodiments, the method further includes: determining a first access count for a second data page in the intermediate memory area; and determining a second access count for the second data page in the intermediate memory area.
[0013] In some embodiments, the method further includes: determining a third access count of a third data page in the intermediate memory area; determining that the third access count is greater than the second access count; and based on determining that the third access count is greater than the second access count, promoting the third data page from the intermediate memory area to the fast memory.
[0014] In some embodiments, the method further includes: determining a third access count of a third data page in an intermediate memory area; determining a fourth access count of the third data page in the intermediate memory area; determining that a sum of the third access count and the fourth access count is greater than a sum of the first access count and the second access count; and based on determining that the sum of the third access count and the fourth access count is greater than a sum of the first access count and the second access count, promoting the third data page from the intermediate memory area to the fast memory.
[0015] In some embodiments, the method further includes: determining a third access count of a third data page in an intermediate memory area; determining a fourth access count of the third data page in the intermediate memory area; determining that the number of non-zero values in the third access count and the fourth access count is greater than the number of non-zero values in the first access count and the second access count; and based on determining that the number of non-zero values in the third access count and the fourth access count is greater than the number of non-zero values in the first access count and the second access count, promoting the third data page from the intermediate memory area to the fast memory.
[0016] In some embodiments: the slow memory includes a persistent memory; the slow memory is managed by a file system; and the method further comprises storing the first access count and the second access count in a file node corresponding to the second data page.
[0017] According to an embodiment of the present disclosure, a system is provided, comprising: a processing circuit; and a memory, which is operably connected to the processing circuit and stores instructions, and the instructions, when executed by the processing circuit, cause the system to execute a method, the method comprising: dropping a first data page from a fast memory to a slow memory; promoting the first data page from the slow memory to an intermediate memory area; and promoting the first data page from the intermediate memory area to a fast memory, wherein the intermediate memory area is a virtual area within the slow memory.
[0018] In some embodiments: moving the first data page from the fast memory to the slow memory is the first moving of the first data page; and the method further includes: performing a second moving of the first data page, the second moving of the first data page including moving the first data page from the fast memory to the slow memory; and increasing the size of the intermediate memory area based on the first moving and the second moving.
[0019] In some embodiments, the method further includes: determining that a page utilization metric in the intermediate memory area is less than a threshold; and reducing a size of the intermediate memory area.
[0020] In some embodiments, the method further includes: determining that a page utilization metric in the intermediate memory area is less than a threshold; and reducing a size of the intermediate memory area, wherein reducing the size of the intermediate memory area includes promoting the second page data from the intermediate memory area to the fast memory.
[0021] In some embodiments, slow memory is managed by a system memory manager.
[0022] In some embodiments: the slow memory comprises persistent memory; and the slow memory is managed by a file system.
[0023] According to an embodiment of the present disclosure, a device is provided, comprising: a processing circuit; a fast memory; and a slow memory, the device being configured to: download a first page of data from the fast memory to the slow memory; promote the first data page from the slow memory to an intermediate memory area; and promote the first data page from the intermediate memory area to the fast memory, wherein the intermediate memory area is a virtual area within the slow memory.
[0024] In some embodiments, slow memory is managed by a system memory manager.
[0025] In some embodiments: the slow memory comprises persistent memory; and the slow memory is managed by a file system. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] These and other features and advantages of the present disclosure will be appreciated and understood with reference to the specification, claims and drawings, in which:
[0027] Figure 1 is a block diagram of a computing system according to an embodiment of the present disclosure;
[0028] Figure 2 is a schematic block diagram of a two-tier memory system according to an embodiment of the present invention;
[0029] Figure 3 is a block diagram of a hierarchical memory system including a virtual intermediate memory area according to an embodiment of the present disclosure; and
[0030] Figure 4 is a flowchart of a method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] The detailed description set forth below in conjunction with the accompanying drawings is intended as a description of an exemplary embodiment of a memory system provided according to the present disclosure, and is not intended to represent the only form in which the present disclosure can be constructed or utilized. The description sets forth the features of the present disclosure in conjunction with the illustrated embodiments. However, it should be understood that the same or equivalent functions and structures can be implemented by different embodiments that are also intended to be included within the scope of the present disclosure. As shown elsewhere herein, the same element numbers are intended to represent the same elements or features.
[0032] In a computer system having different types of memory (which may be organized into different tiers of a hierarchy), frequently accessed data may be stored in higher levels of the hierarchy (e.g., in a tier that includes memory with relatively low latency or relatively high bandwidth), and infrequently accessed data may be stored in lower levels of the hierarchy (e.g., in a tier that includes memory with higher latency or lower bandwidth). For example, in a computer system having two tiers of memory (which may be referred to as fast memory and slow memory), frequently accessed data may be stored in fast memory, and infrequently accessed data may be stored in slow memory.
[0033] As the access pattern of data changes, data that was previously infrequently accessed may become frequently accessed, or vice versa. In this case, the data can be appropriately promoted to fast memory or demoted to slow memory. If the system uses a metric of access frequency (e.g., the number of accesses during a time interval of a specified length) and a corresponding access frequency threshold, data with an access frequency just below the threshold can be promoted due to a small increase in access frequency, and data with an access frequency just above the threshold can be demoted due to a small decrease in access frequency.
[0034] In this case, due to small changes in the access frequency of the data unit, the data unit (e.g., data page) may be repeatedly promoted and then demoted. This repeated promotion and demotion of data may be computationally intensive and may require the data to be repeatedly migrated back and forth between the fast memory and the slow memory. Therefore, in some embodiments, an intermediate memory area is implemented to reduce this repeated promotion and demotion of data. The intermediate memory area can be implemented in the slow memory, and therefore, it can include a virtual memory area; whether a memory page is in the intermediate memory area can be determined by metadata (e.g., a tag) associated with the data page. In this way, moving data from the intermediate memory area to the slow memory can only involve changing the value of the metadata (and may not require copying the data to different memory units), and similarly, moving data from the slow memory to the intermediate memory area can only involve changing the value of the metadata.
[0035] In such an embodiment, when the memory utilization of the fast memory exceeds a utilization threshold, data may be moved from the fast memory to the slow memory; when this occurs, the pages to be moved may be selected based on, for example, a least recently used (LRU) algorithm, where pages that were most recently accessed the furthest in the past are moved first. When data is accessed, it may be promoted from the slow memory to the intermediate memory area. When a certain amount of time has passed without the data being accessed, the data may be moved from the intermediate memory area to the slow memory.
[0036] The intermediate storage area may have a set size at any time, and data may be promoted from the intermediate storage area to the fast storage when the intermediate storage area overflows, for example, (i) when the intermediate storage area is full (the amount of data in the intermediate storage area is equal to the size of the intermediate storage area) and additional data is promoted to the intermediate storage area or (ii) when the intermediate storage area is full (the amount of data in the intermediate storage area is equal to the size of the intermediate storage area) and the size of the intermediate storage area decreases. The size of the intermediate storage area may be adjusted so that repeated promotion and demotion of data is reduced or avoided (e.g., when repeated promotion and demotion of data occurs, the size of the intermediate storage area may be increased) and so that promotion from the intermediate storage area to the fast storage occurs at an acceptable rate (e.g., if promotion from the intermediate storage area to the fast storage is too little, the size of the intermediate storage area may be reduced).
[0037] In such an embodiment, repeated promotion and demotion of data can be reduced or avoided. In a simple two-tier system, data that is close to the promotion and demotion threshold (and may be subject to repeated promotion and demotion of data) can be stored in an intermediate storage area instead and thus subject to different promotion and demotion rules.
[0038] Figure 1 1 is a system-level block diagram of a computing system in some embodiments. The host 105 includes a central processing unit 110, a fast memory 120, which may be system memory (e.g., dynamic random access memory (DRAM)), and a slow memory 125, which may be a persistent memory. The slow memory may include one or more non-volatile dual in-line memory modules (NVDIMMs), or it may be a persistent memory device capable of supporting both a storage protocol (such as non-volatile memory express (NVMe) or compute express link storage protocol (CXL.io)) and a memory protocol (e.g., CXL.mem). In operation, the central processing unit 110 of the host 105 may fetch data and instructions from the fast memory 120 or from the slow memory 125. The central processing unit 110 of the host 105 may then process the data according to the instructions and store the results in the fast memory 120 or the slow memory 125.
[0039] Each physical memory layer in a multi-level memory system may have a different access latency. System software may strive to keep data pages with high access frequency (or "hot" pages) in fast memory 120, and keep data pages with low access frequency (or "cold" pages) in slow memory 125. System software may use a cache replacement algorithm such as Least Recently Used (LRU) to evaluate access frequency (or "heat"). Therefore, pages with intermediate access frequency (or "warm" pages) may "ping-pong" between fast memory 120 and slow memory 125, for example, they may be repeatedly promoted and demoted between fast memory 120 and slow memory 125, and such pages with intermediate access frequency may therefore be frequently migrated between fast memory and slow memory, thereby bringing a significant burden (in the form of overhead) to the computing system. In some cases, the migration overhead may be greater than the overhead of accessing the slow memory.
[0040] Figure 2 A schematic block diagram of a two-tier memory system in some embodiments is shown. Pages 205 with high access frequency may be migrated to (e.g., stored in) fast memory 120, and pages 210 with low access frequency may be migrated to (e.g., stored in) slow memory 125. Pages 215 with intermediate access frequency may be migrated to (e.g., stored in) slow memory 125, which may have a larger capacity than fast memory 120.
[0041] Figure 3A hierarchical memory system including a virtual intermediate memory zone in some embodiments is shown. As used herein, a "zone" within a memory is a portion of a memory. The memory and the zone may be heterogeneous, for example, it may include memory cells constructed using different memory technologies. As used herein, a "virtual zone" in a memory is a subset of memory locations in a memory that are designated or otherwise identified as being functionally different from the remaining memory locations in the memory, rather than physically different from the remaining memory locations in the memory. For example, if the fast memory 120 is composed of dynamic random access memory (DRAM) blocks and the system also includes (slower) persistent memory blocks, a subset of the memory locations of the persistent memory may be identified (e.g., marked) as part of the intermediate memory zone, and the remainder of the persistent memory may form a slow memory. Data stored in a page of the intermediate memory zone may be "moved" (e.g., moved down) to the slow memory, not by copying it to a different page but by changing its designation (e.g., changing the value of a tag that designates the page as being in the slow memory 125 or in the intermediate memory zone). When such accesses cause their access frequency to exceed a threshold, the memory system can virtually promote the accessed pages to an intermediate memory area (or "flexible area") that holds a limited number of pages. If the number of pages in the intermediate memory area exceeds the size of the intermediate memory area, some pages can be physically migrated to the fast memory if there is free space in the fast memory. As used herein, both "promoting" data and "delegating" data mean moving data from one memory to another, or from one memory area to another. "Promoting" can refer to moving data from a memory to another memory with excellent performance, but "promoting" is not limited to such movement (and in some cases, for example, moving data to another memory with excellent performance in some aspects (e.g., bandwidth) and poor performance in other aspects (e.g., latency) can be referred to as "promoting"). "Delegating" can but does not necessarily refer to moving data from a memory to another memory with poor performance.
[0042] The threshold value of the number of pages in the intermediate storage area can be adjusted based on whether repeated promotion and demotion of data occurs and how stable the intermediate storage area is. For example, if repeated promotion and demotion of data occurs, the size of the intermediate storage area can be increased so that more pages can be kept in the intermediate storage area. If the intermediate storage area is stable (e.g., there are few promotions to fast storage 120 and demotions to slow storage 125), the size of the intermediate storage area can be reduced to promote some pages. When determining whether to adjust the size of the intermediate storage area, the demotion of slow storage 125 can be taken into account because if the page is not deactivated to slow storage 125, it can indicate that the page in the intermediate storage area is being accessed.
[0043] Some embodiments may have several advantages. For example, the page migration overhead caused by warm memory pages (which may cause overall system performance degradation) may be mitigated (e.g., reduced). Some embodiments may dynamically reflect page status or system status in page migration decisions. For example, an adaptive intermediate memory area size may be implemented, and the number of pages classified as having an intermediate access frequency may be continuously changed. Page state changes may be reflected in the sense that pages may be virtually promoted to or virtually delegated from the intermediate memory area. Pages classified as having an intermediate access frequency may be reclassified. For example, a page classified as having an intermediate access frequency may then be classified as having a high access frequency, then classified as having an intermediate access frequency, and then classified as having a low access frequency. System state changes may be reflected in the sense that when memory utilization is low, the size of the intermediate memory area may be reduced to promote some pages, and when repeated promotion and delegation of data occurs, even if the number of pages in the intermediate memory area exceeds the intermediate memory area threshold, page promotion from the intermediate memory area to the fast memory may be stopped (by increasing the size of the intermediate memory area). This mechanism can be used for user data pages (eg, slow memory 125 can be used as memory) and file data pages (eg, slow memory 125 can be used as storage).
[0044] As described above, in some embodiments, the slow memory 125 may be used as a storage device. In such embodiments, the slow memory 125 may be a persistent memory such as a non-volatile memory, a solid state drive (SSD) (e.g., a CXL SSD), or an Optane TMMemory. In such an embodiment, the file system can manage the slow memory 125. The file system can allocate pages of the file within the size constraints of the slow memory 125, for example, the size of the file system can be less than or equal to the size of the slow memory 125. To access the file data, the file system can choose whether to use a cache (e.g., fast memory 120) or directly access the file data pages (in the slow memory 125). In such an embodiment, the push down may not need to involve performing a data copy from the fast memory 120 to the slow memory 125, because the slow memory may already have the file data pages; therefore, only the mapping and metadata may be updated.
[0045] In some embodiments, write-intensive file pages may have a lower promotion priority from slow memory to fast memory than read-intensive file pages. File pages may be written back to slow memory; therefore, it may be better to keep write-intensive pages in slow memory 125.
[0046] In an embodiment where slow memory 125 is used as a storage device, the file node of a file page in the file system can store access counts for multiple cycles. For example, a 64-bit number can be used to store (i) a 10-bit write identifier (write ID), a 42-bit or 35-bit page number, and a 12-bit set of access counts (e.g., 3-bit access counts for the four most recent cycles). User space processes (e.g., applications) can (i) access the memory protocol of the virtual memory for memory-mapped files (using load and store instructions executed by the central processing unit 110, after a suitable operating system call such as mmap() in the Linux operating system (which creates a new mapping in the virtual address space of the calling process)) or (ii) access the fast memory 120 and the slow memory 125 through the file system (which can also create a mapping to the virtual memory for the memory-mapped file). Both the memory-mapped file and the file system can interact with both the fast memory 120 and the slow memory 125 (e.g., perform read operations and write operations on them).
[0047] In some embodiments, the virtual memory scan daemon may periodically update the access count. The virtual memory scan daemon may (i) periodically scan the virtual memory range, (ii) check the access bit and dirty bit of each page, (iii) increase the access count of the current cycle if the file page has been accessed, and (iv) clear the access bit or dirty bit. The access count of the current cycle may be increased when (i) a user (e.g., an application) makes a system call to a read() or write() function or (ii) the virtual memory scan daemon detects that the user has accessed the page. When a page table entry (PTE) has an access bit and a dirty bit set by the central processing unit 110 when the user (e.g., the application) accesses or writes a file page, the virtual memory scan daemon may detect that the user has accessed the page. The page table entry may be the last level table entry in a paging system for virtual to physical memory mapping.
[0048] For all cycles in which access counts are being tracked, the access counts of pages with low access frequencies ("cold" pages) may initially be set to "0". If a user accesses such a page, the page may be virtually migrated from the slow memory 125 to the intermediate memory area. The promotion daemon may periodically check the pages in the intermediate memory area. The access counts of the file nodes in the intermediate memory area may be periodically shifted left by 3 bits (e.g., each cycle, the bits may be shifted left by 3 bits, where 3 bits is the width of each access count, as described above). If all access counts become 0, the file page is virtually dropped to the slow memory 125. If the number of pages in the intermediate memory area exceeds the current size threshold of the intermediate memory area, some pages may be promoted to the fast memory 120.
[0049] The promotion priority of the file page (which can be used to select the page to be promoted when the number of pages in the intermediate memory area exceeds the current size threshold of the intermediate memory area) can be set as follows. If the current access count of the page overflows, the page can be promoted immediately (because such an overflow is an indication of a large number of accesses). Otherwise, 12 bits (4 bits + 5 bits + 3 bits) can be used to prioritize each page. Periodically accessed pages (4 bits) can be given the highest priority. If the page has been accessed in every cycle (the current cycle and the previous three cycles), the page can be considered to be accessed periodically. Alternatively, if the number of non-zero values in the access count of the first page is greater than the number of non-zero values in the access count of the second page, it can be determined that the first page is more frequently accessed than the second page (and the first page can be given a higher promotion priority than the second page).
[0050] Frequently accessed pages (5 bits) may be given an intermediate priority. The 5-bit number specifying the access frequency may be the sum of four access counts. For example, if the sum of the access counts of the first page is greater than the sum of the access counts of the second page, it may be determined that the first page is accessed more frequently than the second page (and the first page may be given a higher priority than the second page). Recently accessed pages (3 bits) may be given the lowest priority. The 3 bits may be the access count of the current cycle. For example, if the access count of the current cycle of the first page is greater than the access count of the current cycle of the second page, it may be determined that the first page has been accessed more frequently than the second page recently (and the first page may be given a higher priority than the second page).
[0051] As described above, in some embodiments, slow memory 125 can be used as memory. In such embodiments, slow memory 125 does not need to be persistent memory. Slow memory 125 can be both volatile and non-volatile memory, and the system memory manager can manage slow memory 125. Slow memory 125 can be dynamically allocated to applications for the data of the applications. The data can be copied to the destination memory node. If slow memory 125 is full, some data pages can be swapped out to storage.
[0052] In an embodiment where the slow memory 125 is used as a storage device, the virtual memory scanning daemon may periodically update the access count of the page. The virtual memory scanning daemon may (i) periodically scan the virtual memory range, (ii) check the access bit and dirty bit of the data page, (iii) if the data page has been accessed, increase the access count of the current cycle, and (iv) clear the access bit or dirty bit.
[0053] The system can use data page metadata to manage each data page. When the virtual memory scan daemon detects that a user has accessed a page, the access count of the current cycle can be increased. When a page table entry (PTE) has an access bit and a dirty bit set by the central processing unit 110 when a user (e.g., an application) accesses or writes a file page, the virtual memory scan daemon can detect that the user has accessed the page. The page table entry can be the last level table entry in the paging system for virtual to physical memory mapping.
[0054] For all cycles in which access counts are being tracked, the access counts of pages with low access frequencies ("cold" pages) may initially be set to "0". If a user accesses such a page, the page may be virtually migrated from the slow memory 125 to the intermediate memory area. The promotion daemon may periodically check the pages in the intermediate memory area. The access counts of data pages in the intermediate memory area may be periodically shifted left by 2 bits (e.g., each cycle, the bits may be shifted left by 2 bits; using fewer bits for access counts (compared to embodiments in which the slow memory 125 is used for storage) may allow the system to promote pages more proactively). If all access counts become 0, the file page is virtually dropped to the slow memory 125. If the number of pages in the intermediate memory area exceeds the current size threshold of the intermediate memory area, some pages may be promoted to the fast memory 120.
[0055] The promotion priority of the file page (which can be used to select the page to be promoted when the number of pages in the intermediate memory area exceeds the current size threshold of the intermediate memory area) can be set as follows. If the current access count of the page overflows, the page can be promoted immediately (because such an overflow is an indication of a large number of accesses). Otherwise, 10 bits (4 bits + 4 bits + 2 bits) can be used to prioritize each page. Periodically accessed pages (4 bits) can be given the highest priority. If a page has been accessed in every cycle (the current cycle and the previous three cycles), the page can be considered to be periodically accessed. Alternatively, if the number of non-zero values in the access count of the first page is greater than the number of non-zero values in the access count of the second page, it can be determined that the first page is more frequently accessed than the second page (and the first page can be given a higher promotion priority than the second page).
[0056] Frequently accessed pages (4 bits) may be given an intermediate priority. The 4-bit number specifying the access frequency may be the sum of four access counts. For example, if the sum of the access counts of the first page is greater than the sum of the access counts of the second page, it may be determined that the first page is accessed more frequently than the second page (and the first page may be given a higher priority than the second page). Recently accessed pages (2 bits) may be given the lowest priority. The 2 bits may be the access count of the current cycle. For example, if the access count of the current cycle of the first page is greater than the access count of the current cycle of the second page, it may be determined that the first page has been accessed more frequently than the second page (and the first page may be given a higher priority than the second page).
[0057] Figure 4is a flow chart of a method in some embodiments. The method includes: at 405, delegating a first data page from a fast memory to a slow memory; at 410, promoting the first data page from the slow memory to an intermediate memory area; and at 415, promoting the first data page from the intermediate memory area to a fast memory. The intermediate memory area can be a virtual area within the slow memory. The method also includes performing a second delegating of the first data page at 420, the second delegating of the first data page including delegating the first data page from the fast memory to the slow memory; in response to the first delegating and the second delegating, increasing the size of the intermediate memory area at 425, determining at 430 that a page utilization metric in the intermediate memory area is less than a threshold; and reducing the size of the intermediate memory area at 435. The method also includes: at 440, determining a first access count to a second data page in the intermediate memory area in the first cycle; at 445, determining a second access count to the second data page in the intermediate memory area in the second cycle; at 450, determining a third access count to a third data page in the intermediate memory area in the first cycle; and at 455, determining a fourth access count to the third data page in the intermediate memory area in the second cycle.
[0058] As used herein, "a portion" of something means "at least some" of the thing, and thus may mean less than all of the thing. Therefore, "a portion" of a thing includes the entire thing as a special case, i.e., an example where the entire thing is a portion of a thing. As used herein, when a second amount is "within Y" of a first amount X, it means that the second amount is at least XY and the second amount is at most X+Y. As used herein, when a second number is "within Y%" of a first number, it means that the second number is at least (1-Y / 100) times the first number, and the second number is at most (1+Y / 100) times the first number. As used herein, the term "or" should be interpreted as "and / or", so that, for example, "A or B" means any one of "A" or "B" or "A and B".
[0059] The background technology provided in the background technology section of this disclosure section is included only to set context, and the contents of this section are not admitted to be prior art. Any component or any combination of components described (e.g., in any system diagram included herein) can be used to perform one or more operations of any flow chart included herein. In addition, (i) the operations are example operations and may involve various additional steps that are not explicitly covered, and (ii) the chronological order of the operations may be changed.
[0060] Each of the terms "processing circuit" and "means for processing" is used herein to refer to any combination of hardware, firmware, and software for processing data or digital signals. Processing circuit hardware may include, for example, an application-specific integrated circuit (ASIC), a general or dedicated central processing unit (CPU), a digital signal processor (DSP), a graphics processing unit (GPU), and a programmable logic device such as a field programmable gate array (FPGA). In a processing circuit, as used herein, each function is performed by hardware configured to (i.e., hardwired) perform the function, or by more general hardware (such as a CPU) configured to execute instructions stored in a non-temporary storage medium. The processing circuit may be manufactured on a single printed circuit board (PCB) or distributed on several interconnected PCBs. The processing circuit may contain other processing circuits; for example, the processing circuit may include two processing circuits interconnected on a PCB: an FPGA and a CPU.
[0061] As used herein, when a method (e.g., adjustment) or a first quantity (e.g., first variable) is referred to as being "based on" a second quantity (e.g., second variable), it means that the second quantity is an input to the method or affects the first quantity, for example, the second quantity may be an input (e.g., the only input or one of several inputs) to a function that calculates the first quantity, or the first quantity may be equal to the second quantity. Or the first quantity may be the same as the second quantity (e.g., stored in the same location or locations in memory as the second quantity).
[0062] It should be understood that although the terms "first", "second", "third", etc. may be used herein to describe various elements, components, regions, layers and / or parts, these elements, components, regions, layers and / or parts should not be limited by these terms. These terms are only used to distinguish one element, component, region, layer or part from another element, component, region, layer or part. Therefore, without departing from the spirit and scope of the present invention, the first element, component, region, layer or part discussed herein may be referred to as a second element, component, region, layer or part.
[0063] The terms used herein are used only for the purpose of describing specific embodiments and are not intended to limit the inventive concept. As used herein, the terms "substantially," "about," and similar terms are used as approximate terms rather than terms of degree, and are intended to take into account the inherent deviations of measured or calculated values that one of ordinary skill in the art will recognize.
[0064] As used herein, the singular forms "one" and "an" are intended to also include plural forms, unless the context clearly states otherwise. It will be further understood that when used in this specification, the terms "include" and / or "comprise" specify the presence of the features, integers, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, parts and / or their groups. As used herein, the term "and / or" includes any and all combinations of one or more associated listed items. Expressions such as "at least one of ..." modify the entire element list when following the element list, rather than modifying the individual elements in the list. In addition, when describing the embodiments of the present invention, the use of "can" refers to "one or more embodiments of the present disclosure". In addition, the term "exemplary" is intended to refer to an example or description. As used herein, the terms "use", "using" and "used" can be considered to be synonymous with the terms "utilize", "utilize" and "utilize" respectively.
[0065] It should be understood that when an element or layer is referred to as being "on," "connected to," "coupled to," or "adjacent to" another element or layer, it can be directly on, connected to, coupled to, or adjacent to the other element or layer, or one or more intervening elements or layers may be present. In contrast, when an element or layer is referred to as being "directly on," "directly connected to," "directly coupled to," or "immediately adjacent to" another element or layer, there are no intervening elements or layers.
[0066] Any numerical range described herein is intended to include all sub-ranges of the same numerical precision contained in the listed range. For example, the range of "1.0 to 10.0" or "between 1.0 and 10.0" is intended to include all sub-ranges between the listed minimum value 1.0 and the listed maximum value 10.0 (and including the endpoints), that is, having a minimum value equal to or greater than 1.0 and a maximum value equal to or less than 10.0, such as 2.4 to 7.6. Similarly, the range described as "within 35% of 10" is intended to include all sub-ranges between the listed minimum value 6.5 (i.e., (1-35 / 100) multiplied by 10) and the listed maximum value 13.5 (i.e., (1+35 / 100) multiplied by 10) (and including the endpoints), that is, having a minimum value equal to or greater than 6.5 and a maximum value equal to or less than 13.5, such as 7.4 to 10.6. Any maximum numerical limitation listed herein is intended to include all lower numerical limitations subsumed therein, and any minimum numerical limitation listed herein is intended to include all higher numerical limitations subsumed therein.
[0067] Some embodiments may include the features of the following numbered statements.
[0068] 1. A method comprising:
[0069] Moving the first data page from the fast memory to the slow memory;
[0070] promoting the first data page from the slow memory to an intermediate memory area; and
[0071] promoting the first data page from the intermediate memory area to the fast memory,
[0072] The intermediate memory area is a virtual area in the slow memory.
[0073] 2. The method of claim 1, wherein:
[0074] Delegating the first data page from the fast memory to the slow memory is the first delegating of the first data page; and
[0075] The method further comprises:
[0076] Performing a second decentralization of the first data page, the second decentralization of the first data page comprising decentralizing the first data page from the fast memory to the slow memory; and increasing the size of the intermediate memory area based on the first decentralization and the second decentralization.
[0077] 3. The method according to statement 1 or statement 2, further comprising:
[0078] determining that a page utilization metric in the intermediate memory area is less than a threshold; and
[0079] The size of the intermediate memory area is reduced.
[0080] 4. A method according to any of the preceding statements, further comprising:
[0081] determining that a page utilization metric in the intermediate memory area is less than a threshold; and
[0082] reducing the size of the intermediate memory area,
[0083] The reducing of the size of the intermediate memory area includes promoting a second page of data from the intermediate memory area to the fast memory.
[0084] 5. A method according to any preceding statement, wherein the slow memory is managed by a system memory manager.
[0085] 6. A method according to any of the preceding statements, wherein:
[0086] The slow memory includes persistent memory; and
[0087] Slow memory is managed by the file system.
[0088] 7. The method of statement 1, further comprising:
[0089] determining a first access count for a second data page in the intermediate memory area; and
[0090] A second access count for a second data page in the intermediate memory area is determined.
[0091] 8. The method of statement 7, further comprising:
[0092] determining a third access count for a third data page in the intermediate memory area;
[0093] determining that the third access count is greater than the second access count; and
[0094] Based on determining that the third access count is greater than the second access count, the third data page is promoted from the intermediate memory area to the fast memory.
[0095] 9. The method of statement 7, further comprising:
[0096] determining a third access count for a third data page in the intermediate memory area;
[0097] determining a fourth access count for a third data page in the intermediate memory area;
[0098] determining that a sum of the third access count and the fourth access count is greater than a sum of the first access count and the second access count; and
[0099] Based on determining that a sum of the third access count and the fourth access count is greater than a sum of the first access count and the second access count, the third data page is promoted from the intermediate memory area to the fast memory.
[0100] 10. The method of statement 7, further comprising:
[0101] determining a third access count for a third data page in the intermediate memory area;
[0102] determining a fourth access count for a third data page in the intermediate memory area;
[0103] determining that the number of non-zero values in the third access count and the fourth access count is greater than the number of non-zero values in the first access count and the second access count; and
[0104] Based on determining that the number of non-zero values in the third access count and the fourth access count is greater than the number of non-zero values in the first access count and the second access count, the third data page is promoted from the intermediate memory area to the fast memory.
[0105] 11. The method of claim 7, wherein:
[0106] The slow memory includes a persistent memory;
[0107] The slow memory is managed by a file system; and
[0108] The method also includes storing the first access count and the second access count in a file node corresponding to the second data page.
[0109] 12. A system comprising:
[0110] processing circuitry; and
[0111] a memory operably connected to the processing circuit and storing instructions that, when executed by the processing circuit, cause the system to perform a method comprising:
[0112] Moving the first data page from the fast memory to the slow memory;
[0113] promoting the first data page from the slow memory to an intermediate memory area; and
[0114] promoting the first data page from the intermediate memory area to the fast memory,
[0115] The intermediate memory area is a virtual area in the slow memory.
[0116] 13. The system of statement 12, wherein:
[0117] Delegating the first data page from the fast memory to the slow memory is the first delegating of the first data page; and
[0118] The method further comprises:
[0119] performing a second decentralization of the first data page, wherein the second decentralization of the first data page includes decentralizing the first data page from the fast memory to the slow memory; and
[0120] Based on the first decentralization and the second decentralization, the size of the intermediate storage area is increased.
[0121] 14. The system of statement 12 or statement 13, wherein the method further comprises:
[0122] determining that a page utilization metric in the intermediate memory area is less than a threshold; and
[0123] The size of the intermediate memory area is reduced.
[0124] 15. The system of any one of statements 12 to 14, wherein the method further comprises:
[0125] determining that a page utilization metric in the intermediate memory area is less than a threshold; and
[0126] reducing the size of the intermediate memory area,
[0127] The reducing of the size of the intermediate memory area includes promoting a second page of data from the intermediate memory area to the fast memory.
[0128] 16. The system of any of statements 12 to 15, wherein the slow memory is managed by a system memory manager.
[0129] 17. A system according to any one of statements 12 to 16, wherein:
[0130] The slow memory includes persistent memory; and
[0131] Slow memory is managed by the file system.
[0132] 18. A device comprising:
[0133] Processing circuit;
[0134] Flash memory; and
[0135] Slow memory,
[0136] The device is configured to:
[0137] Deploy a first data page from the fast memory to the slow memory;
[0138] The first data page is promoted from the slow memory to an intermediate memory area; and the first data page is promoted from the intermediate memory area to the fast memory, wherein the intermediate memory area is a virtual area within the slow memory.
[0139] 19. The apparatus of statement 18, wherein the slow memory is managed by a system memory manager.
[0140] 20. The apparatus of claim 18 or claim 19, wherein:
[0141] The slow memory includes persistent memory; and
[0142] Slow memory is managed by the file system.
[0143] Although exemplary embodiments of the memory system have been specifically described and illustrated herein, many modifications and variations will be apparent to those skilled in the art. Therefore, it should be understood that a memory system constructed according to the principles of the present invention may be embodied in a manner other than as specifically described herein. The present invention is further defined in the appended claims and their equivalents.
Claims
1. A method, include: Moving the first data page from the fast memory to the slow memory; promoting a first data page from the slow memory to an intermediate memory area; as well as promoting a first data page from the intermediate memory area to the fast memory, The intermediate memory area includes a virtual area in the slow memory.
2. The method according to claim 1, in: Delegating the first data page from the fast memory to the slow memory includes a first delegating of the first data page; and The method further comprises: Executing a second drop of the first data page, the second drop of the first data page comprising dropping the first data page from the fast memory to the slow memory; and Based on the first decentralization and the second decentralization, the size of the intermediate storage area is increased.
3. The method according to claim 1, further comprising: include: determining that a page utilization metric in the intermediate memory area is less than a threshold; as well as The size of the intermediate memory area is reduced.
4. The method according to claim 1, further comprising: include: determining that a page utilization metric in the intermediate memory area is less than a threshold; as well as reducing the size of the intermediate memory area, The reducing of the size of the intermediate memory area includes promoting a second page of data from the intermediate memory area to the fast memory.
5. The method according to claim 1, in, The slow memory is managed by the system memory manager.
6. The method according to claim 1, in: The slow memory includes persistent memory; and Slow memory is managed by the file system.
7. The method according to claim 1, further comprising: include: determining a first access count for a second data page in the intermediate memory area; as well as A second access count for a second data page in the intermediate memory area is determined.
8. The method according to claim 7, further comprising: include: determining a third access count for a third data page in the intermediate memory area; determining that the third access count is greater than the second access count; as well as Based on determining that the third access count is greater than the second access count, a third data page is promoted from the intermediate memory area to the fast memory.
9. The method according to claim 7, further comprising: include: determining a third access count for a third data page in the intermediate memory area; determining a fourth access count for a third data page in the intermediate memory area; determining that a sum of the third access count and the fourth access count is greater than a sum of the first access count and the second access count; as well as Based on determining that the sum of the third access count and the fourth access count is greater than the sum of the first access count and the second access count, a third data page is promoted from the intermediate memory area to the fast memory.
10. The method according to claim 7, further comprising: include: determining a third access count for a third data page in the intermediate memory area; determining a fourth access count for a third data page in the intermediate memory area; determining that the number of non-zero values in the third access count and the fourth access count is greater than the number of non-zero values in the first access count and the second access count; as well as Based on determining that the number of non-zero values in the third access count and the fourth access count is greater than the number of non-zero values in the first access count and the second access count, a third data page is promoted from the intermediate memory area to the fast memory.
11. The method according to claim 7, in: The slow memory includes a persistent memory; The slow memory is managed by a file system; and The method also includes storing the first access count and the second access count in a file node corresponding to the second data page.
12. A system, include: Processing circuit; as well as a memory operably connected to the processing circuit and storing instructions that, when executed by the processing circuit, cause the system to perform a method comprising: Moving the first data page from the fast memory to the slow memory; promoting a first data page from the slow memory to an intermediate memory area; and promoting a first data page from the intermediate memory area to the fast memory, The intermediate memory area is a virtual area in the slow memory.
13. The system according to claim 12, in: The first data page is transferred from the fast memory to the slow memory for the first time; and The method further comprises: Executing a second drop of the first data page, the second drop of the first data page comprising dropping the first data page from the fast memory to the slow memory; and Based on the first decentralization and the second decentralization, the size of the intermediate storage area is increased.
14. The system according to claim 12, in, The method further comprises: determining that a page utilization metric in the intermediate memory area is less than a threshold; and The size of the intermediate memory area is reduced.
15. The system according to claim 12, in, The method further comprises: determining that a page utilization metric in the intermediate memory area is less than a threshold; and reducing the size of the intermediate memory area, The reducing of the size of the intermediate memory area includes promoting a second page of data from the intermediate memory area to the fast memory.
16. The system of claim 12, wherein the slow memory is managed by a system memory manager.
17. The system according to claim 12, in: The slow memory includes persistent memory; and Slow memory is managed by the file system.
18. A device, include: Processing circuit; Fast memory; as well as Slow memory, The device is configured to: Deploy a first data page from the fast memory to the slow memory; promoting a first data page from the slow memory to an intermediate memory area; and promoting a first data page from the intermediate memory area to the fast memory, The intermediate memory area is a virtual area in the slow memory.
19. The apparatus of claim 18, wherein the slow memory is managed by a system memory manager.
20. The device according to claim 18, in: The slow memory includes persistent memory; and Slow memory is managed by the file system.
Citation Information
Patent Citations
Memory system and operating method of same
CN109656470A
Partial storage of large files in distinct storage systems
CN110168513A
Storage device, control method of storage device, and storage medium
CN114595160A
Information processing apparatus, storage device, and computer program product
US20170228155A1
Hybrid use of non-volatile memory as storage device and cache
US20200125290A1
