Memory Page Pre-Padding for Higher Cache Compression
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing cache compression technologies face reduced compression ratios due to the presence of random values in cache lines, which do not match the data compression mode, leading to inefficient data migration between the cache and memory.
Innovation Solution
A memory page processing method that involves pre-padding memory pages with data sequences matching the cache compression mode when a page fault occurs, ensuring that data evicted from the cache matches the compression mode and enhances the compression ratio.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If cache compression technology is used to compress data in cache lines, then data migration efficiency between cache and memory is improved, but compression ratio decreases when random values are present in cache lines
Solution Approach 1:
The patent applies preliminary action by pre-padding memory pages with data sequences that match cache compression modes before actual data is written. When a page fault occurs, the system allocates a memory page and pads it with appropriate data sequences (such as zero sequences for ZPC mode or pattern sequences for other compression modes). This preliminary padding ensures that when data is later evicted from cache to memory, the data already matches the compression mode, enabling effective compression without requiring complex detection and matching processes at eviction time.
2Quantity of substance
If memory pages are pre-padded with data sequences matching cache compression mode, then compression ratio of evicted data is increased, but workload of padding data increases
Solution Approach 1:
The patent applies local quality by making the padding operation conditional rather than universal. The system determines whether padding is necessary based on the specific cache compression mode being used and the characteristics of the data. For example, if the cache line data already matches a compression mode pattern, padding may be skipped. The padding operation is performed locally and selectively on memory pages that will benefit from it, rather than applying it uniformly to all memory pages, thus reducing unnecessary workload.
Solution Approach 2:
The system applies self-service by using the data sequences that will be written to memory pages to pad those same pages in advance. Instead of using arbitrary or random padding data, the system uses the actual data sequences that match the compression mode, allowing the data itself to serve the dual purpose of being both the padding content and the future stored data. This eliminates the need for separate padding data generation and reduces the overall workload.
3Productivity
If data in cache lines does not match cache compression mode, then compression cannot be applied, but applying compression anyway increases processing overhead
Solution Approach 1:
The patent eliminates the need for runtime compression mode matching by performing the matching action in advance. When memory pages are allocated, they are pre-padded with data sequences that correspond to specific cache compression modes (such as ZPC, RLE, or other supported modes). This preliminary action ensures that when data is evicted from cache, it already matches the compression mode, allowing the compression hardware to immediately apply the appropriate compression algorithm without performing detection and matching operations, thus reducing processing overhead and energy consumption.
Data Source
Figure 1~2
Figure 3
Figure 4
AI summary
This application discloses a memory page processing method and device, an apparatus, and a storage medium, and pertains to the field of communication technologies. According to the method, after a memory page is allocated to a virtual address that causes a page fault, the allocated memory page is pre-padded with first data, and then the memory page padded with the first data is accessed. Subsequently, if data in the memory page is migrated to a cache, the first data padded in the memory page is also migrated to the cache. If the data in the memory page is evicted from the cache to a memory, the evicted cache data may also include the first data. Because the first data is data in a data sequence corresponding to a cache compression mode, when the cache data including the first data is evicted back to the memory, a probability that the cache data matches the cache compression mode can be increased. In this way, a compression ratio of the cache data can be increased.