From: Maninder Singh <maninder1.s@samsung.com>
To: Vaneet Narang <v.narang@samsung.com>,
Mark Rutland <mark.rutland@arm.com>
Cc: "catalin.marinas@arm.com" <catalin.marinas@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"laoar.shao@gmail.com" <laoar.shao@gmail.com>,
AMIT SAHRAWAT <a.sahrawat@samsung.com>,
"vincenzo.frascino@arm.com" <vincenzo.frascino@arm.com>,
"will@kernel.org" <will@kernel.org>,
"ardb@kernel.org" <ardb@kernel.org>,
"walken@google.com" <walken@google.com>,
"maz@kernel.org" <maz@kernel.org>,
"daniel.m.jordan@oracle.com" <daniel.m.jordan@oracle.com>,
"mingo@redhat.com" <mingo@redhat.com>,
"samitolvanen@google.com" <samitolvanen@google.com>,
"adobriyan@gmail.com" <adobriyan@gmail.com>,
"keescook@chromium.org" <keescook@chromium.org>,
"arnd@arndb.de" <arnd@arndb.de>,
"anshuman.khandual@arm.com" <anshuman.khandual@arm.com>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"broonie@kernel.org" <broonie@kernel.org>,
"kristina.martsenko@arm.com" <kristina.martsenko@arm.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"john.johansen@canonical.com" <john.johansen@canonical.com>,
"avagin@gmail.com" <avagin@gmail.com>,
"steve.capper@arm.com" <steve.capper@arm.com>,
"gladkov.alexey@gmail.com" <gladkov.alexey@gmail.com>,
"oleg@redhat.com" <oleg@redhat.com>,
"bernd.edlinger@hotmail.de" <bernd.edlinger@hotmail.de>,
"james.morse@arm.com" <james.morse@arm.com>,
"ebiederm@xmission.com" <ebiederm@xmission.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Subject: RE: [PATCH 1/1] arm64: add support for PAGE_SIZE aligned kernel stack
Date: Fri, 07 Aug 2020 16:47:20 +0530 [thread overview]
Message-ID: <20200807111720epcms5p1206fe967bcee6136774c8432ed5b514b@epcms5p1> (raw)
In-Reply-To: <20200804061526epcms5p3ff393f7e51d28ed896105c868bd31e5b@epcms5p3>
Hi Mark,
>>If you are seeing issues with the current stack size, can you please
>>explain that in more detail? Where are you seeing problems? Which
>>configuration options do you have selected?
>>
We checked on our system with netflix and youtube 4K videos running
max stack consumption was 7 KB:
sh-3.2# cat /sys/kernel/debug/tracing/stack_max_size
7312
Thus we thought 16KB wil waste a lot of memory for our ARM64 target,
and 8KB can be less in some exceptional case.
So we decided for 12 KB change.
>>I'm not keen on making kernel stack sizes configurable as it's not
>>currently possible for the person building the kernel to figure out a
>>safe size (and if this were possible, it's be better to handle this
>>automatically).
>>
Ok, can we do something else?, like not making it configurable,
but do code changes to support it for PAGE_SIZE aligned stacks
rather than power of 2 alignement.
Although with configurable also, it depends on VMAP stack,
so user will have stack exhaust exception and can increase acccordingly also.
>
>Motivation behind these changes is saving memory on our system.
>Our system runs around 2500 threads concurrently so saving 4Kb
>might help us in saving 10MB memory.
>
>To ensure 12KB is sufficient for our system we have used stack tracing and
>realised maximum stack used is not more than 9KB.
> /sys/kernel/tracing/stack_max_size
>
>Tracing interface defined by kernel to track maximum stack size can be used
>by others to decide appropriate stack size.
>
Thanks
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2020-08-07 11:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200802165825epcas5p3a2127be681530fdd785db0f8961eaf96@epcas5p3.samsung.com>
2020-08-02 16:35 ` [PATCH 1/1] arm64: add support for PAGE_SIZE aligned kernel stack Maninder Singh
2020-08-03 12:34 ` Mark Rutland
2020-08-04 6:15 ` Vaneet Narang
2020-08-07 11:17 ` Maninder Singh [this message]
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=20200807111720epcms5p1206fe967bcee6136774c8432ed5b514b@epcms5p1 \
--to=maninder1.s@samsung.com \
--cc=a.sahrawat@samsung.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=avagin@gmail.com \
--cc=bernd.edlinger@hotmail.de \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=daniel.m.jordan@oracle.com \
--cc=ebiederm@xmission.com \
--cc=gladkov.alexey@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=james.morse@arm.com \
--cc=john.johansen@canonical.com \
--cc=keescook@chromium.org \
--cc=kristina.martsenko@arm.com \
--cc=laoar.shao@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=rostedt@goodmis.org \
--cc=samitolvanen@google.com \
--cc=steve.capper@arm.com \
--cc=v.narang@samsung.com \
--cc=vincenzo.frascino@arm.com \
--cc=walken@google.com \
--cc=will@kernel.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