[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201117204204.GA3905260@google.com>
Date: Tue, 17 Nov 2020 12:42:04 -0800
From: Minchan Kim <minchan@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Vijayanand Jitta <vjitta@...eaurora.org>,
linux-mm <linux-mm@...ck.org>, glider@...gle.com,
Dan Williams <dan.j.williams@...el.com>, broonie@...nel.org,
mhiramat@...nel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Yogesh Lal <ylal@...eaurora.org>,
Vinayak Menon <vinmenon@...eaurora.org>
Subject: Re: [PATCH] lib: stackdepot: Add support to configure STACK_HASH_SIZE
On Thu, Nov 12, 2020 at 02:56:49PM -0800, Andrew Morton wrote:
> On Thu, 12 Nov 2020 18:26:24 +0530 Vijayanand Jitta <vjitta@...eaurora.org> wrote:
>
> > >> 1. page_owner=off, stackdepot_stack_hash=0 -> no more wasted memory
> > >> when we don't use page_owner
> > >> 2. page_owner=on, stackdepot_stack_hash=8M -> reasonable hash size
> > >> when we use page_owner.
> > >>
> > >>
> > >
> > > This idea looks fine to me. Andrew and others would like to hear your
> > > comments as well on this before implementing.
> > >
> > > Thanks,
> > > Vijay
> > >
> >
> > Awaiting for comments from Andrew and others.
>
> I don't actually understand the problem.
>
> What is it about page-owner that causes stackdepot to consume
> additional memory? As far as I can tell, sizeof(struct stack_record)
> isn't affected by page-owner?
>
Thing is once we build stackdepot due to the dependency from page_owner,
it will consume 8M regardless of using page_owner.
#define STACK_HASH_SIZE (1L << CONFIG_STACK_HASH_ORDER_SHIFT)
static struct stack_record *stack_table[STACK_HASH_SIZE] = {
[0 ... STACK_HASH_SIZE - 1] = NULL
};
So if we decide the size option at build time, we should consume
the memory anyway regardless of page_owner enabling in runtime.
Powered by blists - more mailing lists