lkml.org 
[lkml]   [2021]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v6 2/2] lib: stackdepot: Add support to disable stack depot
On Wed, 27 Jan 2021 17:36:38 +0530 vjitta@codeaurora.org wrote:

> Add a kernel parameter stack_depot_disable to disable
> stack depot. So that stack hash table doesn't consume
> any memory when stack depot is disabled.
>
> The usecase is CONFIG_PAGE_OWNER without page_owner=on.
> Without this patch, stackdepot will consume the memory
> for the hashtable. By default, it's 8M which is never trivial.
>
> With this option, in CONFIG_PAGE_OWNER configured system,
> page_owner=off, stack_depot_disable in kernel command line,
> we could save the wasted memory for the hashtable.

CONFIG_STACKDEPOT=n:

main.c:(.init.text+0x4c1): undefined reference to `stack_depot_init'


--- a/include/linux/stackdepot.h~lib-stackdepot-add-support-to-disable-stack-depot-fix
+++ a/include/linux/stackdepot.h
@@ -21,5 +21,13 @@ unsigned int stack_depot_fetch(depot_sta

unsigned int filter_irq_stacks(unsigned long *entries, unsigned int nr_entries);

+#ifdef CONFIG_STACKDEPOT
int stack_depot_init(void);
+#else
+static inline int stack_depot_init(void)
+{
+ return 0;
+}
+#endif /* CONFIG_STACKDEPOT */
+
#endif
_
\
 
 \ /
  Last update: 2021-01-28 02:02    [W:0.119 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site