CMA Memory Allocation Screening Marks

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing memory allocation methods, such as CMA, face inefficiencies when high memory usage occurs, leading to prolonged wait times for contiguous memory allocation, especially when application programs perform extensive input/output operations or require data processing by the driver layer, resulting in delayed processing and user experience degradation.

Innovation Solution

A memory allocation method that screens and removes application programs occupying contiguous memory for an extended period by using preset screening marks and migrates them to newly-allocated memory, allowing for faster allocation to drivers, and a multi-core concurrent method that divides memory allocation requests across processing units for simultaneous allocation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If CMA shares memory to application programs using specially marked migration type, then memory can be shared to application programs when driver does not use memory, but data provided by application program may be provided to driver layer for processing, such that driver has to wait for longer time when contiguous memory is allocated by CMA

Engineering Contradiction:
Improvememory sharing capabilityVSAvoidmemory allocation time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent extracts and identifies application programs that occupy contiguous memory for extended periods using preset screening marks. By detecting these specific applications through marking mechanisms, the system can selectively migrate only the problematic applications rather than all applications, thereby reducing memory allocation wait time for drivers while maintaining memory sharing for other applications.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent implements preliminary identification and marking of application programs that are likely to occupy memory for long periods. By screening and marking these applications in advance based on their characteristics (such as I/O operations and data processing patterns), the system prepares for potential memory reallocation before the driver actually needs the memory, thus reducing the actual allocation wait time.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If CMA shares memory to application programs, then memory utilization is improved, but when current application program needs to perform a great amount of input and output operations, it may takes longer time for CMA to allocate the contiguous memory for the driver

Engineering Contradiction:
Improvememory utilizationVSAvoidcontiguous memory allocation time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent extracts application programs performing extensive I/O operations through screening marks that identify such patterns. By detecting applications with high I/O activity, the system can prioritize their migration when driver memory allocation is needed, thus maintaining high memory utilization during normal operation while enabling quick reallocation when drivers require contiguous memory.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent implements a feedback mechanism through screening marks that monitor application program behavior patterns. The system continuously observes which applications are performing I/O operations and occupies memory for extended periods, and uses this feedback information to make intelligent decisions about when to migrate applications, thereby balancing memory utilization with allocation speed.

Inventive Principle:
Principle #23Feedback

3Reliability

If memory is reserved in advance for GPU, Camera and HDMI, then these devices can have sufficient memory, but the reserved memory is unavailable for other application programs and resources cannot be fully utilized

Engineering Contradiction:
Improvememory availability for devicesVSAvoidmemory utilization rate
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent transforms the static memory reservation system into a dynamic one by introducing screening marks and migration mechanisms. Memory can be dynamically allocated to devices like GPU, Camera, and HDMI when needed, and dynamically released back to the general pool when not in use. This dynamic approach ensures reliable memory availability for devices while maximizing overall memory utilization through flexible reallocation.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11294720B2CMA memory allocation method based on screening marks
Publication Date: 2022.04.05 AMLOGIC (SHANGHAI) CO LTD
  • US11294720B2 patent drawing
  • US11294720B2 patent drawing
  • US11294720B2 patent drawing

AI summary

A memory/multi-core concurrent memory allocation method, which is applied to an embedded system, wherein a kernel module and a plurality of application programs are provided. The memory allocation method comprises: acquiring first memory allocation requests of the plurality of application programs; the kernel module determining whether preset screening marks exist in the first memory allocation requests; when screening marks exist in the first memory allocation requests, prohibiting allocating memory for the current application program managed by a contiguous memory allocator. By adopting the memory allocation method, the application programs which occupy contiguous memory allocated by the continuous memory allocator for a long time can be screened and removed, then contiguous memory allocation can be provided for the drivers in a shorter time, and the corresponding contiguous continuous memory can be allocated for the drivers through a plurality of processing units at the same time with a higher efficiency.