[RFC PATCH 0/2] mm, slub: Use stackdepot to store user information for slub object

From: Imran Khan
Date: Tue Aug 31 2021 - 02:26:01 EST


This series of patches proposes use of STACKDEPOT to
store user (SLAB_STORE_USER) information of a slub object.
As stack traces corresponding to each unique allocation
and freeing context can be saved and retrieved from STACKDEPOT,
we can reduce size of each object (~256 bytes) and hence save
memory without losing any information.

*PATCH-1: Makes STACKDEPOT explicitly configurable, so that
it can be enabled for storing allocation/freeing stack traces.

*PATCH-2: Uses STACKDEPOT to store allocation/freeing context
for a slub object.

I have marked this series as RFC, so that I can get feedback
about this change, because this change just involves debugging
framework and does not add any value to production scenarios.

Imran Khan (2):
lib, stackdepot: Add input prompt for STACKDEPOT option.
mm, slub: Use stackdepot to store user information for slub object.

lib/Kconfig | 3 +-
mm/slub.c | 87 +++++++++++++++++++++++++++++------------------------
2 files changed, 50 insertions(+), 40 deletions(-)

--
2.25.1