From: Matthew Wilcox <willy@infradead.org>
To: Peter Collingbourne <pcc@google.com>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>,
Alexandru Elisei <alexandru.elisei@arm.com>,
David Hildenbrand <david@redhat.com>,
lsf-pc@lists.linux-foundation.org,
"cc: linux-mm" <linux-mm@kvack.org>
Subject: Re: [LSF/MM/BPF TOPIC] Dynamic Growth of Kernel Stacks
Date: Fri, 23 Feb 2024 21:56:42 +0000 [thread overview]
Message-ID: <ZdkUmh20YVIz0gin@casper.infradead.org> (raw)
In-Reply-To: <CAMn1gO7ELoF+MdUco46ck_-kd99Tdjnf0y8SCevzFDjVfXXpjw@mail.gmail.com>
On Fri, Feb 23, 2024 at 01:49:08PM -0800, Peter Collingbourne wrote:
> I wonder if this is another potential use case for bringing back
> cleancache, as proposed in [1]? The idea would be that all kernel
> stacks have 16KB allocations but only one page accessible and the rest
> available as cleancache. We can handle a fault on one of those pages
> by discarding the cleancache page and remapping it as r/w.
That seems like the most complicated way to solve the problem.
Stack pages which have not been accessed contain no data, so do not
need swap or cleancache, they just need to be allocatable. And the
fault handler needs to be able to handle faults from interrupt context,
which I'm not sure all architectures can do.
The "We need to be able to allocate memory from interrupt context" is
really not that hard to handle; just keep three pages in a per-cpu array.
Refill the array at return-to-process-context.
next prev parent reply other threads:[~2024-02-23 21:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 1:03 [LSF/MM/BPF TOPIC] Dynamic Growth of Kernel Stacks Pasha Tatashin
2024-02-23 21:49 ` Peter Collingbourne
2024-02-23 21:56 ` Matthew Wilcox [this message]
2024-02-23 22:01 ` Peter Collingbourne
2024-04-30 13:07 ` [Lsf-pc] " Michal Hocko
2024-05-01 0:20 ` Pasha Tatashin
2024-05-02 7:19 ` Michal Hocko
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=ZdkUmh20YVIz0gin@casper.infradead.org \
--to=willy@infradead.org \
--cc=alexandru.elisei@arm.com \
--cc=david@redhat.com \
--cc=linux-mm@kvack.org \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=pasha.tatashin@soleen.com \
--cc=pcc@google.com \
/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