]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lib/stackdepot: add refcount for records
authorAndrey Konovalov <andreyknvl@google.com>
Mon, 20 Nov 2023 17:47:14 +0000 (18:47 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 20 Nov 2023 21:16:40 +0000 (13:16 -0800)
commitc55dff137fd30f59982bcbce54943403729ca545
tree1d2893c40e23bd7545295708f014e8e632e36c5a
parent880a2b2f9f1151ef3064682945711ff2ad3537cb
lib/stackdepot: add refcount for records

Add a reference counter for how many times a stack records has been
  added to stack depot.

Add a new STACK_DEPOT_FLAG_GET flag to stack_depot_save_flags that
  instructs the stack depot to increment the refcount.

Do not yet decrement the refcount; this is implemented in one of the
  following patches.

Do not yet enable any users to use the flag to avoid overflowing the
  refcount.

This is preparatory patch for implementing the eviction of stack records
  from the stack depot.

Link: https://lkml.kernel.org/r/a3fc14a2359d019d2a008d4ff8b46a665371ffee.1700502145.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Marco Elver <elver@google.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/stackdepot.h
lib/stackdepot.c