[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC] x86, mm: use _PAGE_BIT_SOFTW2 as _PAGE_BIT_NUMA

On Fri, Nov 07, 2014 at 08:52:10AM +0000, Mel Gorman wrote:
> On Thu, Nov 06, 2014 at 05:48:16PM +0000, Wei Liu wrote:
> > In b38af4721 ("x86,mm: fix pte_special versus pte_numa") pte_special()
> > (SPECIAL with PRESENT or PROTNONE) was made to complement pte_numa()
> > (SPECIAL with neither PRESENT nor PROTNONE). That broke Xen PV guest
> > with NUMA balancing support.
> > 
> > That's because Xen hypervisor sets _PAGE_GLOBAL (_PAGE_GLOBAL /
> > _PAGE_PROTNONE in Linux) for guest user space mapping. So in a Xen PV
> > guest, when NUMA balancing is enabled, a NUMA hinted PTE ends up
> > "SPECIAL (in fact NUMA) with PROTNONE but not PRESENT", which makes
> > pte_special() returns true when it shouldn't.
> > 
> > Fundamentally we only need _PAGE_NUMA and _PAGE_PRESENT to tell
> > difference between an unmapped entry and an entry protected for NUMA
> > hinting fault. So use _PAGE_BIT_SOFTW2 as _PAGE_BIT_NUMA, adjust
> > 
> > Suggested-by: David Vrabel <david.vrabel@xxxxxxxxxx>
> > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> I suggest instead that you force automatic NUMA balancing to be disabled
> on Xen PV guests until I or someone else finds time to implement Linus'
> idea to remove _PAGE_NUMA entirely. It's been on my TODO list for a few
> weeks but I still have not reached the point where I'm back working on
> upstream material properly.

No problem. Thanks for the suggestion.


> -- 
> Mel Gorman
> SUSE Labs

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.