mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-06 05:44:20 +08:00
b9ad003af1
This adds the following new sysfs file tracking the number of successfully released pages from a given CMA heap area. This file will be available via CONFIG_CMA_SYSFS and help in determining active CMA pages available on the CMA heap area. This adds a new 'nr_pages_released' (CONFIG_CMA_SYSFS) into 'struct cma' which gets updated during cma_release(). /sys/kernel/mm/cma/<cma-heap-area>/release_pages_success After this change, an user will be able to find active CMA pages available in a given CMA heap area via the following method. Active pages = alloc_pages_success - release_pages_success That's valuable information for both software designers, and system admins as it allows them to tune the number of CMA pages available in the system. This increases user visibility for allocated CMA area and its utilization. Link: https://lkml.kernel.org/r/20240206045731.472759-1-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
32 lines
939 B
Plaintext
32 lines
939 B
Plaintext
What: /sys/kernel/mm/cma/
|
|
Date: Feb 2021
|
|
Contact: Minchan Kim <minchan@kernel.org>
|
|
Description:
|
|
/sys/kernel/mm/cma/ contains a subdirectory for each CMA
|
|
heap name (also sometimes called CMA areas).
|
|
|
|
Each CMA heap subdirectory (that is, each
|
|
/sys/kernel/mm/cma/<cma-heap-name> directory) contains the
|
|
following items:
|
|
|
|
alloc_pages_success
|
|
alloc_pages_fail
|
|
|
|
What: /sys/kernel/mm/cma/<cma-heap-name>/alloc_pages_success
|
|
Date: Feb 2021
|
|
Contact: Minchan Kim <minchan@kernel.org>
|
|
Description:
|
|
the number of pages CMA API succeeded to allocate
|
|
|
|
What: /sys/kernel/mm/cma/<cma-heap-name>/alloc_pages_fail
|
|
Date: Feb 2021
|
|
Contact: Minchan Kim <minchan@kernel.org>
|
|
Description:
|
|
the number of pages CMA API failed to allocate
|
|
|
|
What: /sys/kernel/mm/cma/<cma-heap-name>/release_pages_success
|
|
Date: Feb 2024
|
|
Contact: Anshuman Khandual <anshuman.khandual@arm.com>
|
|
Description:
|
|
the number of pages CMA API succeeded to release
|