lib: stackdepot: add support to configure STACK_HASH_SIZE

Linux Kernel / Linux Kernel - Yogesh Lal [codeaurora.org] - 26 February 2021 17:41 UTC

Use CONFIG_STACK_HASH_ORDER to configure STACK_HASH_SIZE.

Aim is to have configurable value for STACK_HASH_SIZE, so depend on use case one can configure it.

One example is of Page Owner, CONFIG_PAGE_OWNER works only if page_owner=on via kernel parameter on CONFIG_PAGE_OWNER configured system. Thus, unless admin enable it via command line option, the stackdepot will just waste 8M memory without any customer.

Making it configurable and use lower value helps to enable features like CONFIG_PAGE_OWNER without any significant overhead.

Link: https://lkml.kernel.org/r/1611749198-24316-1-git-send-email-vjitta@codeaurora.org

d262093656a0 lib: stackdepot: add support to configure STACK_HASH_SIZE
lib/Kconfig | 9 +++++++++
lib/stackdepot.c | 3 +--
2 files changed, 10 insertions(+), 2 deletions(-)

Upstream: git.kernel.org


  • Share