[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090316135544.52719f04@skybase>
Date: Mon, 16 Mar 2009 13:55:44 +0100
From: Martin Schwidefsky <schwidefsky@...ibm.com>
To: Nick Piggin <npiggin@...e.de>
Cc: Matt Mackall <mpm@...enic.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, Gerald Schaefer <gerald.schaefer@...ibm.com>,
akpm@...ux-foundation.org, Hugh Dickins <hugh@...itas.com>
Subject: Re: [PATCH] fix/improve generic page table walker
On Mon, 16 Mar 2009 13:36:54 +0100
Nick Piggin <npiggin@...e.de> wrote:
> > With the page table folding "3 levels removed from the bottom" doesn't
> > tell me much since there is no real representation in hardware AND in
> > memory for the missing page table levels. So the only valid meaning of
> > a pgd_t is that you have to use pud_offset, pmd_offset and pte_offset
> > to get to a pte. If I do the page table folding at runtime or at
> > compile time is a minor detail.
>
> I don't know if it would be helpful to you, but I solve a similar
> kind of problem in the lockless radix tree by encoding node height
> in the node itself. Maybe you could use some bits in the page table
> pointers or even in the struct pages for this.
That is what I already do: there are two bits in the region and segment
table entries that tell me at what level I am (well actually it is the
hardware definition that requires me to do that and I just make use of
it). The page table primitives (pxd_present, pxd_offset, etc) look at
these bits and then do the right thing.
What is killing me is the pgd++/pud++ operation. If there is only a 2
or 3 level page table the pointer increase may not happen. This is done
by a correct end address for the walk.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
--
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