mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
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>
This commit is contained in:
committed by
Jakub Kicinski
parent
ce83278f31
commit
4e66934eaa
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user