aboutsummaryrefslogtreecommitdiffstats
path: root/mm/Kconfig
diff options
context:
space:
mode:
authorMinchan Kim <minchan@kernel.org>2021-05-04 18:37:28 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-05-05 11:27:24 -0700
commit43ca106fa8ec7d684776fbe561214d3b2b7cb9cb (patch)
treebc9c70c760442d5d8ede69e52c2df0d96262b835 /mm/Kconfig
parentmm: cma: add trace events for CMA alloc perf testing (diff)
downloadlinux-dev-43ca106fa8ec7d684776fbe561214d3b2b7cb9cb.tar.xz
linux-dev-43ca106fa8ec7d684776fbe561214d3b2b7cb9cb.zip
mm: cma: support sysfs
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/YCOAmXqt6dZkCQYs@kroah.com/ Link: https://lkml.kernel.org/r/20210324230759.2213957-1-minchan@kernel.org Link: https://lore.kernel.org/linux-mm/20210316100433.17665-1-colin.king@canonical.com/ Signed-off-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Colin Ian King <colin.king@canonical.com> Tested-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: John Hubbard <jhubbard@nvidia.com> Tested-by: Anders Roxell <anders.roxell@linaro.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: John Dias <joaodias@google.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Colin Ian King <colin.king@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/Kconfig')
-rw-r--r--mm/Kconfig7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/Kconfig b/mm/Kconfig
index f4ceeaedb966..5f7d7b3d8cc2 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -518,6 +518,13 @@ config CMA_DEBUGFS
help
Turns on the DebugFS interface for CMA.
+config CMA_SYSFS
+ bool "CMA information through sysfs interface"
+ depends on CMA && SYSFS
+ help
+ This option exposes some sysfs attributes to get information
+ from CMA.
+
config CMA_AREAS
int "Maximum count of the CMA areas"
depends on CMA