Re: [RFC][PATCH 0/10] alternate 4-level page tables patches
[Posted December 22, 2004 by corbet]
| From: |
| Linus Torvalds <torvalds-AT-osdl.org> |
| To: |
| Andi Kleen <ak-AT-suse.de> |
| Subject: |
| Re: [RFC][PATCH 0/10] alternate 4-level page tables patches |
| Date: |
| Mon, 20 Dec 2004 10:40:07 -0800 (PST) |
| Cc: |
| Hugh Dickins <hugh-AT-veritas.com>,
Nick Piggin <nickpiggin-AT-yahoo.com.au>,
Linux Memory Management <linux-mm-AT-kvack.org>,
Andrew Morton <akpm-AT-osdl.org> |
| Archive-link: |
| Article,
Thread
|
On Mon, 20 Dec 2004, Andi Kleen wrote:
>
> But I'm not strongly opposed to it. If everybody else thinks "pud_t"
> is the greatest thing since sliced bread and much a much better name
> than "pml4_t" then I guess we could eat the delay and disruption
> that another round of these disruptive patches takes.
To me, it's not the name, but the _placement_.
"pml4_t" is at the _top_, and replaces "pgd_t" in that position. While
"pud_t" is in the _middle_, and extends upon the existing practice of
folding the mid directory.
I had a reason why I put "pmd_t" in between the old pgd_t and pte_t when I
expanded from two to three levels: it ends up adding the levels at the
point where they are conceptually the least intrusive.
By "conceptually least intrusive", think about this: one of the most core
header files in the kernel, <linux/sched.h> mentions "pgd_t", but it does
_not_ mention "pmd_t". Why?
Basically, by doing the new folded table in the middle, it _only_ affects
code that actually walks the page tables. Basically, what I wanted in the
original 2->3 leval expansion was that people who don't use the new level
should be able to conceptually totally ignore it. I think that is even
more true in the 3->4 level expansion.
I haven't done any side-by-side comparisons on your original patches, and
on Nick's version of your patches, but I'm pretty certain that Nick's
patches are more "directed", with less noise. Not because of any name
issues, but because I think the right place to do the folding is in the
middle.
Quite frankly, I don't love Nick's patches either. I'd prefer to see the
infrastructure happen first - have the patch sequence first make _every_
single architecture use the "generic pud_t folding", and basically be in
the position where the first <n> patches just do the syntactic part that
makes it possible for then patches <n+1>, <n+2> to actually convert
individual architectures that want it.
But Nick's patches seem to come fairly close to that.
So no, naming isn't the big difference. The conceptual difference is
bigger. It's just that once you conceptually do it in the middle, a
numbered name like "pml4_t" just doesn't make any sense (I don't think it
makes much sense at the top either, since there is no 1..2..3 to match it,
but that's a separate issue ;)
Linus
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
(
Log in to post comments)