On Thu, 25 Mar 2021 at 00:09, Minchan Kim <[email protected]> wrote:
>
> Since CMA is getting used more widely, it's more important to
> keep monitoring CMA statistics for system health since it's
> directly related to user experience.
>
> This patch introduces sysfs statistics for CMA, in order to provide
> some basic monitoring of the CMA allocator.
>
>  * the number of CMA page successful allocations
>  * the number of CMA page allocation failures
>
> These two values allow the user to calcuate the allocation
> failure rate for each CMA area.
>
> e.g.)
>   /sys/kernel/mm/cma/WIFI/alloc_pages_[success|fail]
>   /sys/kernel/mm/cma/SENSOR/alloc_pages_[success|fail]
>   /sys/kernel/mm/cma/BLUETOOTH/alloc_pages_[success|fail]
>
> The cma_stat was intentionally allocated by dynamic allocation
> to harmonize with kobject lifetime management.
> https://lore.kernel.org/linux-mm/[email protected]/
>
> Tested-by: Dmitry Osipenko <[email protected]>
> Reviewed-by: Dmitry Osipenko <[email protected]>
> Reviewed-by: Greg Kroah-Hartman <[email protected]>
> Reviewed-by: John Hubbard <[email protected]>
> Link: 
> https://lore.kernel.org/linux-mm/[email protected]/
> Addresses-Coverity: ("Dereference after null check")
> Signed-off-by: Colin Ian King <[email protected]>
> Signed-off-by: Minchan Kim <[email protected]>

Tested-by: Anders Roxell <[email protected]>

Reply via email to