From: Linus Torvalds <torvalds@osdl.org>
To: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>, Andi Kleen <ak@suse.de>,
Linux Memory Management <linux-mm@kvack.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [RFC][PATCH 0/10] alternate 4-level page tables patches
Date: Mon, 20 Dec 2004 19:47:28 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.58.0412201940270.4112@ppc970.osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0412210230500.24496-100000@localhost.localdomain>
On Tue, 21 Dec 2004, Hugh Dickins wrote:
> On Tue, 21 Dec 2004, Nick Piggin wrote:
> >
> > Anyway, I'll continue to try to get more architecture support,
>
> Sorry for being dense: despite your earlier explanation,
> I've yet again lost track of why pud needs any flag day through
> the architectures - beyond the inclusion of some generic nopud.h,
> but different from the one you're rightly aiming for.
It really should not need one.
If you do it right (and "right" here means "wrong"), all architectures
should continue to work, aside from the fact that they get some nasty
pointer type warnings.
> Good as they are, imagine setting aside your nopmd.h mods as a cleanup
> for some other occasion. Then wouldn't a generic nopud.h something like
>
> #define pud_t pgd_t
> #define pud_alloc(mm, pgd, address) (pgd)
> #define pud_offset(pgd, start) (pgd)
> #define pud_none(pud) 0
> #define pud_bad(pud) 0
> #define pud_ERROR(pud)
> #define pud_clear(pud)
> #define PUD_SIZE PGDIR_SIZE
> #define PUD_MASK PGDIR_MASK
That gets it 99% of the way, but the fact is, code that hasn't been
changed to actually _use_ pud_t etc will get a warning because it will
pass down a "pgd_t *" to the "pmd_present()" things, and that's wrong -
they should be converted to get "pud_t"s.
(Or, the other way around: if an architecture has _not_ updated its
pmd_offset() etc friends, it will get horrible pointer type warnings from
code that expects a pud_t).
But since such an architecture will actually only _have_ three levels of
pages tables anyway, the warnings will be only warnings - the code
generated should be correct anyway.
(It may be _possible_ to avoid the warnings by just making "pud_t" and
"pmd_t" be the same type for such architectures, and just allowing
_mixing_ of three-level and four-level accesses. I have to say that I
consider that pretty borderline programming practice though).
> But I don't see why the pagetable code in each arch subdirectory needs
> to have a pud level inserted all at once (whereas a flag day was needed
> for the pml4 patch, because mm->pgd got replaced by mm->pml4).
There is a "flag day", because even architectures that haven't been
updated to 4-level page tables will see the four-level page table accessor
functions in generic code. But see above: I think we can make the
"flagness" be less critical, in the sense that it will generate warnings,
but the code will still work.
But yes, that really _requires_ that the new level is in the "middle", aka
the pud_t approach of Nick's patches. And I may be missing something.
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>
next prev parent reply other threads:[~2004-12-21 3:47 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-18 6:55 Nick Piggin
2004-12-18 6:55 ` [PATCH 1/10] " Nick Piggin
2004-12-18 6:56 ` [PATCH 2/10] " Nick Piggin
2004-12-18 6:56 ` [PATCH 3/10] " Nick Piggin
2004-12-18 6:57 ` [PATCH 4/10] " Nick Piggin
2004-12-18 6:58 ` [PATCH 5/10] " Nick Piggin
2004-12-18 6:58 ` [PATCH 6/10] " Nick Piggin
2004-12-18 6:59 ` [PATCH 7/10] " Nick Piggin
2004-12-18 7:00 ` [PATCH 8/10] " Nick Piggin
2004-12-18 7:00 ` [PATCH 9/10] " Nick Piggin
2004-12-18 7:01 ` [PATCH 10/10] " Nick Piggin
2004-12-18 7:31 ` Andi Kleen
2004-12-18 7:46 ` Nick Piggin
2004-12-18 8:08 ` Andrew Morton
2004-12-18 9:48 ` Andi Kleen
2004-12-18 19:06 ` Linus Torvalds
2004-12-20 17:43 ` Andi Kleen
2004-12-20 17:47 ` Randy.Dunlap
2004-12-20 18:08 ` Linus Torvalds
2004-12-20 18:15 ` Linus Torvalds
2004-12-20 18:19 ` Andi Kleen
2004-12-20 18:47 ` Linus Torvalds
2004-12-20 18:52 ` Linus Torvalds
2004-12-20 18:59 ` Andi Kleen
2004-12-20 18:57 ` Randy.Dunlap
2004-12-18 9:05 ` [PATCH 4/10] " Nick Piggin
2004-12-18 9:50 ` Andi Kleen
2004-12-18 10:06 ` Nick Piggin
2004-12-18 10:11 ` Andi Kleen
2004-12-18 10:22 ` Nick Piggin
2004-12-18 10:29 ` Nick Piggin
2004-12-18 11:06 ` William Lee Irwin III
2004-12-18 11:17 ` Nick Piggin
2004-12-18 11:32 ` William Lee Irwin III
2004-12-18 11:55 ` Nick Piggin
2004-12-18 12:46 ` William Lee Irwin III
2004-12-18 12:48 ` William Lee Irwin III
2004-12-19 0:05 ` Nick Piggin
2004-12-19 0:20 ` William Lee Irwin III
2004-12-19 0:38 ` Nick Piggin
2004-12-19 1:01 ` William Lee Irwin III
2004-12-19 1:31 ` Linus Torvalds
2004-12-19 2:08 ` William Lee Irwin III
2004-12-19 2:26 ` Nick Piggin
2004-12-19 5:23 ` Linus Torvalds
2004-12-19 6:02 ` William Lee Irwin III
2004-12-19 18:17 ` Linus Torvalds
2004-12-20 1:00 ` William Lee Irwin III
2004-12-18 10:45 ` William Lee Irwin III
2004-12-18 10:58 ` Nick Piggin
2004-12-19 0:07 ` [RFC][PATCH 0/10] " Hugh Dickins
2004-12-19 0:33 ` Nick Piggin
2004-12-20 18:04 ` Andi Kleen
2004-12-20 18:40 ` Linus Torvalds
2004-12-20 18:53 ` Andi Kleen
2004-12-21 0:04 ` Linus Torvalds
2004-12-21 0:22 ` Andi Kleen
2004-12-21 0:43 ` Linus Torvalds
2004-12-21 0:47 ` Nick Piggin
2004-12-21 2:55 ` Hugh Dickins
2004-12-21 3:21 ` Nick Piggin
2004-12-21 3:47 ` Linus Torvalds [this message]
2004-12-21 3:56 ` Linus Torvalds
2004-12-21 4:04 ` Nick Piggin
2004-12-21 4:08 ` Nick Piggin
2004-12-21 9:36 ` Andi Kleen
2004-12-21 10:13 ` Hugh Dickins
2004-12-21 10:59 ` Nick Piggin
2004-12-21 17:36 ` Linus Torvalds
2004-12-21 20:19 ` Andi Kleen
2004-12-21 23:49 ` Nick Piggin
2004-12-22 10:38 ` Andi Kleen
2004-12-22 11:19 ` Nick Piggin
2004-12-22 11:23 ` Nick Piggin
2004-12-22 18:07 ` Andi Kleen
2004-12-30 21:24 ` Nick Piggin
2004-12-21 10:52 ` Nick Piggin
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=Pine.LNX.4.58.0412201940270.4112@ppc970.osdl.org \
--to=torvalds@osdl.org \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=hugh@veritas.com \
--cc=linux-mm@kvack.org \
--cc=nickpiggin@yahoo.com.au \
/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