[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080125002401.GA31745@elte.hu>
Date: Fri, 25 Jan 2008 01:24:01 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Andi Kleen <ak@...e.de>
Cc: tglx@...utronix.de, linux-kernel@...r.kernel.org,
"H. Peter Anvin" <hpa@...or.com>
Subject: [x86.git] new CPA implementation
* Andi Kleen <ak@...e.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists