summaryrefslogtreecommitdiffstats
path: root/lib/Kconfig
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-12-04 20:21:55 -0800
committerJakub Kicinski <kuba@kernel.org>2021-12-06 16:04:44 -0800
commit4e66934eaadc83b27ada8d42b60894018f3bfabf (patch)
treefc56c9432018c4128c6462cc5f970bd2212aab9d /lib/Kconfig
parentce83278f313ce65a9bbd780a3e07fa3f62d82525 (diff)
downloadlinux-stable-4e66934eaadc83b27ada8d42b60894018f3bfabf.tar.gz
linux-stable-4e66934eaadc83b27ada8d42b60894018f3bfabf.tar.bz2
linux-stable-4e66934eaadc83b27ada8d42b60894018f3bfabf.zip
lib: add reference counting tracking infrastructure
It can be hard to track where references are taken and released. In networking, we have annoying issues at device or netns dismantles, and we had various proposals to ease root causing them. This patch adds new infrastructure pairing refcount increases and decreases. This will self document code, because programmers will have to associate increments/decrements. This is controled by CONFIG_REF_TRACKER which can be selected by users of this feature. This adds both cpu and memory costs, and thus should probably be used with care. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'lib/Kconfig')
-rw-r--r--lib/Kconfig5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Kconfig b/lib/Kconfig
index 5e7165e6a346..655b0e43f260 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -680,6 +680,11 @@ config STACK_HASH_ORDER
Select the hash size as a power of 2 for the stackdepot hash table.
Choose a lower value to reduce the memory impact.
+config REF_TRACKER
+ bool
+ depends on STACKTRACE_SUPPORT
+ select STACKDEPOT
+
config SBITMAP
bool