Method, apparatus and system for processing data
US-2018293121-A1 · Oct 11, 2018 · US
US10698832B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-10698832-B2 |
| Application number | US-201816050221-A |
| Country | US |
| Kind code | B2 |
| Filing date | Jul 31, 2018 |
| Priority date | Dec 13, 2017 |
| Publication date | Jun 30, 2020 |
| Grant date | Jun 30, 2020 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
The present invention discloses a method of using memory allocation to address hot and cold data, which comprises steps: using a hardware performance monitor (HPM) to detect at least one read/write event of a central processor; while a number of the read/write events reaches a threshold or a random value, a computer system recording an access type of the read/write event occurring latest and a memory address causing the read/write event; and the computer system assigning the memory object in the memory address to a volatile memory or a non-volatile memory according to the memory address and the access type. Thereby, data pages can be assigned automatically according to the access types categorized by the central processor, exempted from being assigned manually by engineers.
Opening claim text (preview).
What is claimed is: 1. A method of using memory allocation to address hot and cold data, comprises steps: using a hardware performance monitor (HPM) to detect at least one read/write event of a central processor of a computer system; said computer system recording an access type and an address of said at least one read/write event occurring latest; and said computer system determining an attribute of a memory object according to an access type of a malloc-like instruction, an access types of the memory object is allocated by said malloc-like instruction, and said access type of said memory object is determined in profiling phase or on-line analysis phase by using HPM, and assigning said memory object to a volatile memory or a non-volatile memory of a main memory layer according to said access type of the memory object allocated by said malloc-like instruction; wherein memory allocation instructions of said computer system assigns said memory object, and wherein while said memory object is assigned, said computer system records which one of said memory allocation instructions assigns said memory object and an attribute of said memory object assigned by said memory allocation instruction, and wherein an attribute of said memory allocation instruction is set according to a common attribute of a plurality of memory objects allocated by said memory allocation instructions in profiling phase or in on-line profiling phase, and said plurality of memory objects assigned by said memory allocation instruction are all set to have an identical initial attribute. 2. The method of using memory allocation to address hot and cold data according to claim 1 , wherein said hardware performance monitor detects a read/write event in said central processor, a read/write event in at least one cache memory of said central processor, or a read/write event in a last-layer cache of said cache memory. 3. The method of using memory allocation to address hot and cold data according to claim 2 , wherein said hardware performance monitor only records an address and a type of a reading activity, a writing activity or a fetching instruction of a missing event occurring in said cache. 4. The method of using memory allocation to address hot and cold data according to claim 2 , wherein access types in occurrence of said at least one read/write event include an access type of said central processor, an access type of said cache memory, and an access type in said last-layer cache when cache miss in said last-layer cache. 5. The method of using memory allocation to address hot and cold data according to claim 1 , wherein said access types of said at least one read/write event includes loading, storing, and fetching an instruction. 6. The method of using memory allocation to address hot and cold data according to claim 1 , wherein said non-volatile memory is set to be a read-only memory, and wherein while said memory object of a memory address is assigned to and written into a data page in said non-volatile memory, an exception event is triggered, and wherein said computer system moves said data page to said volatile memory according to said exception event, amends a page table, and then writes corresponding information of said data page into said page table. 7. The method of using memory allocation to address hot and cold data according to claim 1 , wherein said attributes of the plurality of memory objects includes hot data, cold data, and hot_cold data, which are hot data converted from cold data. 8. The method of using memory allocation to address hot and cold data according to claim 1 , wherein said hardware performance monitor directly records at least one read/write event into a buffer in said volatile memory or said non-volatile memory of said main memory layer, and wherein once said buffer is filled up, said central processor is informed to undertake succeeding treatments. 9. The method of using memory allocation to address hot and cold data according to claim 6 , wherein said data page is placed in said volatile memory or said non-volatile memory according to said attribute and a system target of maximum service life, best performance, or optimized energy consumption. 10. The method of using memory allocation to address hot and cold data according to claim 9 , wherein said data page is swapped-out to a swap-space of a flash memory, wherein said flash memory undertakes wear leveling. 11. The method of using memory allocation to address hot and cold data according to claim 1 further comprising a step: according to an initialized direct memory access (DMA) function, making statistics of access numbers and attributes of a plurality of memory objects accessed by said DMA functions and categorizing said attributes of said plurality of memory objects accessed by said DMA functions. 12. The method of using memory allocation to address hot and cold data according to claim 1 , wherein said volatile memory is divided into a plurality of sections according to a system target, and wherein said system target is maximum service life, best performance, or optimized energy consumption, and wherein each of said sections stores corresponding data according to said system target. 13. The method of using memory allocation to address hot and cold data according to claim 12 , wherein said section is partitioned dynamically or partitioned through an offline analysis. 14. The method of using memory allocation to address hot and cold data according to claim 6 , wherein while space of said volatile memory is insufficient, said data page, which is most infrequently used in the future, is moved to said non-volatile memory or at least one secondary storage through modify said page table, and at least one new memory object is moved to said volatile memory from said non-volatile memory or said at least one secondary storage. 15. The method of using memory allocation to address hot and cold data according to claim 1 , wherein said computer system predicts future behavior of a memory allocation instruction according to events of reading, writing, and fetching instructions, which are detected by said hardware performance monitor. 16. The method of using memory allocation to address hot and cold data according to claim 14 wherein said space of said volatile memory is allocated according to a least-recently-used-like (LRU-like) methods, a least-frequently-used-like (LFU-like) method, a first-in-first-out (FIFO) method, or another memory behavior prediction method, and wherein said another memory behavior prediction method is an Adaptive Replacement Cache (ARC-like) algorithms or a Clock with Adaptive Replacement (CAR-like) algorithms. 17. The method of using memory allocation to address hot and cold data according to claim 1 , wherein said hardware performance monitor uses profiling or online analysis to monitor and assign plural memory addresses. 18. The method of using memory allocation to address hot and cold data according to claim 17 , wherein while executing said hardware performance monitor for the first time, said computer system establishes a statistic table to undertake profiling; while having collected information sufficient to determine an attribute of a memory allocation instruction, said computer system stops profiling; while executing a new memory allocation instruction having never seen before, said computer system restarts profiling until said computer system has collected information sufficient to determine an attribute of said memory allocation instruction. 19. The method of using memory allocation to a
Management of blocks · CPC title
in relation to life time, e.g. increasing Mean Time Between Failures [MTBF] · CPC title
Hybrid memory, e.g. using both volatile and non-volatile memory · CPC title
Power efficiency · CPC title
Life time enhancement · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.