RE: Re: Re: [PATCH 1/1] stackdepot: interface to check entries and size of stackdepot.

From: Vaneet Narang
Date: Fri Nov 24 2017 - 08:42:22 EST


Hi Michal,

>>ÂWeÂhaveÂbeenÂgettingÂsimilarÂkindÂofÂsuchÂentriesÂandÂeventually
>>ÂstackdepotÂreachesÂMaxÂCap.ÂSoÂweÂfoundÂthisÂinterfaceÂusefulÂinÂdebugging
>>ÂstackdepotÂissueÂsoÂsharedÂinÂcommunity.
Â
>ThenÂuseÂitÂforÂinternalÂdebuggingÂandÂprovideÂaÂcodeÂwhichÂwouldÂscale
>betterÂonÂsmallerÂsystems.ÂWeÂdoÂnotÂneedÂthisÂinÂtheÂkernelÂIMHO.ÂWeÂdo
>notÂmergeÂallÂtheÂdebuggingÂpatchesÂweÂuseÂforÂinternalÂdevelopment.

Not just debugging but this information can also be used to profile and tune stack depot.
Getting count of stack entries would help in deciding hash table size and
page order used by stackdepot.

For less entries, bigger hash table and higher page order slabs might not be required as
maintained by stackdepot. As i already mentioned smaller size hashtable can be choosen and
similarly lower order pages can be used for slabs.

If you think its useful, we can share scalable patch to configure below two values based on
number of stack entries dynamically.

#define STACK_ALLOC_ORDER 2
#define STACK_HASH_SIZE (1L << STACK_HASH_ORDER)


Regards,
Vaneet Narang