Dynamic CMA Area Sizing for Reliable Contiguous Allocation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Contiguous memory allocation (CMA) failures occur when there is insufficient contiguous memory area, leading to inadequate storage for multimedia data and deteriorating digital content service quality.
Innovation Solution
A memory management method that adjusts the size of the CMA area by identifying and converting non-CMA page blocks to CMA blocks based on CMA requests, ensuring sufficient contiguous memory allocation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a fixed partial area of memory is allocated as reserved area during booting, then memory management is simple and stable, but CMA allocation fails when there is not enough contiguous memory area
Solution Approach 1:
The patent implements dynamic adjustment of CMA area size by converting between CMA blocks and non-CMA blocks based on system state. The memory management system monitors CMA area sufficiency and dynamically converts non-CMA page blocks to CMA blocks when CMA area becomes insufficient, and converts CMA blocks to non-CMA blocks when CMA area exceeds requirements. This dynamic conversion mechanism resolves the contradiction by making the reserved area flexible rather than fixed, improving CMA allocation success rate while maintaining manageable complexity through automated conversion logic.
Solution Approach 2:
The patent changes the parameter of reserved area size from a fixed value set at booting to a dynamically adjustable value. The system monitors the actual CMA area availability and adjusts the reserved area size by converting page blocks between CMA and non-CMA types. When CMA area becomes insufficient, the reserved area size is increased by converting non-CMA blocks to CMA blocks. This parameter change approach resolves the contradiction by allowing the system to adapt memory allocation to actual needs rather than relying on a static configuration.
2Reliability
If CMA area size is increased to prevent allocation failures, then CMA allocation success improves, but available memory for other purposes decreases
Solution Approach 1:
The patent implements dynamic conversion between CMA blocks and non-CMA blocks to optimize the balance between CMA area availability and overall memory utilization. When CMA allocation fails or CMA area becomes insufficient, the system dynamically converts non-CMA page blocks to CMA blocks, increasing CMA area only when necessary. Conversely, when CMA area exceeds requirements, excess CMA blocks are converted back to non-CMA blocks, making memory available for other purposes. This dynamic adjustment resolves the contradiction by ensuring CMA area is expanded only to the extent needed for reliable allocation while preserving memory for other uses when CMA requirements are met.
Solution Approach 2:
The patent dynamically changes the reserved area size parameter based on actual CMA allocation needs rather than maintaining a permanently large reserved area. The system monitors CMA area sufficiency and adjusts the reserved area size by converting page blocks between types. When CMA area is sufficient, the reserved area size is reduced by converting CMA blocks to non-CMA blocks, freeing memory for other purposes. When CMA area becomes insufficient, the reserved area size is increased by converting non-CMA blocks to CMA blocks. This parameter adjustment strategy resolves the contradiction by optimizing the trade-off between CMA reliability and overall memory availability.
3Productivity
If non-CMA page blocks are converted to CMA blocks to increase CMA area, then CMA allocation performance improves, but memory allocation flexibility decreases
Solution Approach 1:
The patent implements a dynamic conversion mechanism that transforms the memory allocation system from static to adaptive. The system continuously monitors CMA area sufficiency and automatically converts non-CMA page blocks to CMA blocks when CMA allocation performance deteriorates or CMA area becomes insufficient. Conversely, when CMA area exceeds requirements, the system converts excess CMA blocks back to non-CMA blocks, restoring allocation flexibility. This dynamic conversion resolves the contradiction by ensuring CMA blocks are created only when necessary for improved allocation performance, while preserving non-CMA blocks for flexible allocation when CMA performance is adequate.
Solution Approach 2:
The patent dynamically changes the composition of memory blocks by converting between CMA and non-CMA types based on system state. The system monitors CMA allocation performance and adjusts the proportion of CMA blocks in the memory system. When CMA allocation performance is poor or CMA area is insufficient, the system increases the proportion of CMA blocks by converting non-CMA blocks. When CMA performance is adequate and CMA area exceeds needs, the system decreases the proportion of CMA blocks by converting them to non-CMA blocks, thereby restoring memory allocation flexibility. This parameter change approach resolves the contradiction by optimizing CMA block proportion dynamically rather than maintaining a fixed composition.
Data Source
AI summary
A memory management method is provided. The memory management method includes: allocating, by a processor, a partial area of a memory as a reserved area during booting; identifying, by the processor, a contiguous memory allocation (CMA) area in the reserved area based on a CMA request of a process, wherein the CMA request indicates a required size; adjusting, by the processor, a size of the CMA area based on the size of the CMA area and the required size; and allocating, by the processor, to the process, a portion of the memory in the adjusted CMA area corresponding to the required size.


