From: Minchan Kim <minchan@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Vijayanand Jitta <vjitta@codeaurora.org>,
linux-mm <linux-mm@kvack.org>,
glider@google.com, Dan Williams <dan.j.williams@intel.com>,
broonie@kernel.org, mhiramat@kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Yogesh Lal <ylal@codeaurora.org>,
Vinayak Menon <vinmenon@codeaurora.org>
Subject: Re: [PATCH] lib: stackdepot: Add support to configure STACK_HASH_SIZE
Date: Tue, 17 Nov 2020 12:42:04 -0800 [thread overview]
Message-ID: <20201117204204.GA3905260@google.com> (raw)
In-Reply-To: <20201112145649.3fcd9dc4d6d3db4bd26245bb@linux-foundation.org>
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@codeaurora.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.
next prev parent reply other threads:[~2020-11-17 20:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-22 13:15 [PATCH] lib: stackdepot: Add support to configure STACK_HASH_SIZE vjitta
2020-11-03 23:27 ` Minchan Kim
2020-11-04 10:29 ` Vijayanand Jitta
2020-11-12 12:56 ` Vijayanand Jitta
2020-11-12 22:56 ` Andrew Morton
2020-11-17 20:42 ` Minchan Kim [this message]
2020-11-19 3:34 ` Zhenhua Huang
2020-11-20 5:04 ` Minchan Kim
2020-11-20 7:08 ` Zhenhua Huang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201117204204.GA3905260@google.com \
--to=minchan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=broonie@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=glider@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhiramat@kernel.org \
--cc=vinmenon@codeaurora.org \
--cc=vjitta@codeaurora.org \
--cc=ylal@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).