From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Matthew Wilcox <willy@infradead.org>
Cc: Mike Rapoport <rppt@linux.ibm.com>,
lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org
Subject: Re: [LSF/MM/BPF TOPIC] Page table manipulation primitives
Date: Fri, 7 Feb 2020 20:45:53 +0300 [thread overview]
Message-ID: <20200207174553.mx6onurbvhgn7w5p@box> (raw)
In-Reply-To: <20200206173410.GW8731@bombadil.infradead.org>
On Thu, Feb 06, 2020 at 09:34:10AM -0800, Matthew Wilcox wrote:
> On Thu, Feb 06, 2020 at 06:57:41PM +0200, Mike Rapoport wrote:
> > While updating the architectures to properly use 5-level folded page tables
> > without <asm-generic/?level-fixup.h> and <asm-generic/pgtable-nop4d-hack.h>
> > I wondered if we can do better than explicitly name each and every level of
> > the page table, open-code traversal of all the layers numerous times and
> > have copied do_something_pXd_range().
> >
> > Then I've come across Kirill's "Proof-of-concept: better(?) page-table
> > manipulation API" [1], but as far as I could see there was no progress
> > since then.
> >
> > I'd like to resurrect the topic and try to see if we can come up with
> > actually better page table manipulation API.
> >
> > [1] https://lore.kernel.org/lkml/20180424154355.mfjgkf47kdp2by4e@black.fi.intel.com/
I played a bit more with it after that, but got distracted to other stuff.
I'll see if I'll be able to come up with an update.
> I don't think this approach helps support 64k pages on ARM
Could you specify what such support would require?
> , for example,
> so it doesn't solve enough problems to be worth doing. I'd favour
> an interface which looked more like this:
>
> vpte_iter iter;
> vpte_t vpte;
>
> vpte_iter_for_each(vpte, iter, start, end, flags) {
> unsigned char order = vpte_order(&iter);
> ... do things based on vpte and order ...
> }
It looks like just an higher level API that can be provided over my
approach. Maybe it should be the default go-to. But I find it useful to be
able go into low-level details where it is matters.
--
Kirill A. Shutemov
next prev parent reply other threads:[~2020-02-07 17:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 16:57 Mike Rapoport
2020-02-06 17:34 ` Matthew Wilcox
2020-02-07 17:45 ` Kirill A. Shutemov [this message]
2020-02-07 19:40 ` Matthew Wilcox
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=20200207174553.mx6onurbvhgn7w5p@box \
--to=kirill@shutemov.name \
--cc=linux-mm@kvack.org \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=rppt@linux.ibm.com \
--cc=willy@infradead.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