Re: [PATCH] x86: fix /proc/meminfo DirectMap

From: Hugh Dickins
Date: Fri Aug 15 2008 - 10:30:30 EST


On Fri, 15 Aug 2008, Ingo Molnar wrote:
> * Hugh Dickins <hugh@xxxxxxxxxxx> wrote:
>
> > Should we really be using level2_ident_pgt (which needs to avoid NX)
> > for the final direct map (which wants to use NX)? But my attempt to
> > build up a fresh pagetable there failed miserably to boot!
>
> hm, exactly what change have you tried? (patch?)

As soon as that kernel failed to boot, I chucked the patch away and
erased it from my mind: much better to leave such a change to the
people who are intimate with this sequence and can debug it.

It wasn't anything much, the page to use has already been set aside
for alloc_low_page, I thought it was just a matter of breaking the
association with level2_ident_pgt at the right level then letting
phys_pmd_init do its usual setup from scratch.

Maybe it didn't work because I got it slightly wrong, or maybe it
it didn't work for more subtle reasons e.g. I was then building up
the first 1GB of direct map 2MB by 2MB: if direct map is actually
used in there and falls out of TLB, I'd certainly be in trouble.

Hugh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/