[RFC] implicit hugetlb pages (mmu_context_to_struct)
David Gibson
david at gibson.dropbear.id.au
Mon Jan 12 12:54:00 EST 2004
On Fri, Jan 09, 2004 at 01:29:38PM -0800, Adam Litke wrote:
>
> mmu_context_to_struct (2.6.0):
> This patch converts the mmu_context variable to a structure. It is
> needed for the dynamic address space resizing patch.
Ok, changing the context to a struct is a reasonable idea, but "flags"
is a really bad name for the existing field. What the mmu_context
(currently) mostly contains is the actual mm context ID which is used
to create VSIDs. Additionally it has exactly one flag -
CONTEXT_LOW_HPAGES - but that's only there because I avoided doing
this conversion to a struct when I first did the hugepage support.
If you're going to convert the mmu context to a struct, it would make
sense to pull that flag out and put it in its own field. If we add
dynamic hugepage range support in the right way, I think we'll be able
to subsume the LOW_HPAGES flag into whatever information the dynamic
range stuff needs.
I also think it would probably be better to no longer include the
whole mmu context structure in the mmu_context_queue. All it needs to
store is the actual context number, and having the other information
there has the potential to cause strange and subtle bugs. I remember
debugging various problems from not properly clearing the LOW_HPAGES
flag when contexts where placed back into the queue.
--
David Gibson | For every complex problem there is a
david AT gibson.dropbear.id.au | solution which is simple, neat and
| wrong.
http://www.ozlabs.org/people/dgibson
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list