From: Ingo Molnar <mingo@elte.hu>
To: Andi Kleen <ak@suse.de>
Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org,
"H. Peter Anvin" <hpa@zytor.com>
Subject: [x86.git] new CPA implementation
Date: Fri, 25 Jan 2008 01:24:01 +0100 [thread overview]
Message-ID: <20080125002401.GA31745@elte.hu> (raw)
* Andi Kleen <ak@suse.de> wrote:
> > please unify the files first, we dont want to let pageattr_32.c and
> > pageattr_64.c diverge even more. Once we get these files unified we
> > layer more features ontop of it.
>
> They work significantly differently in a few important areas (e.g.
> particularly regarding NX handling and the kernel mapping) Off the top
> of my head I don't know of a clean way to unify them. 32bit and 64bit
> kernel mappings differ in many significant ways. Maybe it's possible,
> but it's certainly not something I would want to tackle short term in
> a hurry. [...]
FYI, we've unified and streamlined them in latest x86.git. There's now a
single arch/x86/mm/pagattr.c implementation of the c_p_a() APIs that is
used by both the 32-bit and by the 64-bit x86 kernel.
It's a significantly cleaner and simpler c_p_a() implementation, and
it's also structured in a way to make it easy for gbpages (and clflush)
to be added as well.
One of the big simplifications was to remove largepage reassembly. (We
could perhaps still add that back in the future, if someone shows the
performance benefits and real-life significance of it. But the
refcounting was nasty and error-prone and was buggy even with your
latest CPA patches.)
other features:
- the new implementation is much more scalable, because it is lockless
in the fastpath - while previous c_p_a() implementations used a global
spinlock / or the global init_task.mmap_sem semaphore.
- new 64-bit CONFIG_DEBUG_PAGEALLOC support has been implemented and
has been tested to work fine.
- PAGEALLOC does not require PSE to be cleared from the CPU anymore.
(The pagetables will still be broken up into 4K ptes during bootup,
but that happens as part of the regular c_p_a() sequence. (and thus
we get more testing of the largepage-splitup code)
- the CPA-testsuite now passes without failures on both 32-bit and
64-bit. (it never fully worked with your CPA series.)
> The kernel mappings between 32bit and 64bit are quite different. [...]
10 lines of code (out of 300 lines of pageattr.c) handles that
difference.
the new code is still being tested, but it's looking pretty good so far.
(Note: certain bits within the new cpa series are not backmerged yet.)
Ingo
next reply other threads:[~2008-01-25 0:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-25 0:24 Ingo Molnar [this message]
2008-01-25 8:01 ` [x86.git] new CPA implementation Andi Kleen
2008-01-25 13:30 ` Ingo Molnar
2008-01-25 14:51 ` Andi Kleen
2008-01-26 16:30 ` Arjan van de Ven
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=20080125002401.GA31745@elte.hu \
--to=mingo@elte.hu \
--cc=ak@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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