aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/stackdepot.h
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2023-11-20 18:47:09 +0100
committerAndrew Morton <akpm@linux-foundation.org>2023-12-10 16:51:45 -0800
commitb29d31885814003245e2e36373bef4ea6721f114 (patch)
tree7a2aef5a4ff499ea3be2bd4ccc09c173df6253ee /include/linux/stackdepot.h
parentlib/stackdepot: store next pool pointer in new_pool (diff)
downloadlinux-rng-b29d31885814003245e2e36373bef4ea6721f114.tar.xz
linux-rng-b29d31885814003245e2e36373bef4ea6721f114.zip
lib/stackdepot: store free stack records in a freelist
Instead of using the global pool_offset variable to find a free slot when storing a new stack record, mainlain a freelist of free slots within the allocated stack pools. A global next_stack variable is used as the head of the freelist, and the next field in the stack_record struct is reused as freelist link (when the record is not in the freelist, this field is used as a link in the hash table). This is preparatory patch for implementing the eviction of stack records from the stack depot. Link: https://lkml.kernel.org/r/b9e4c79955c2121b69301778643b203d3fb09ccc.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>
Diffstat (limited to 'include/linux/stackdepot.h')
0 files changed, 0 insertions, 0 deletions