From: Wei Liu <wei.liu2@citrix.com>
To: Mel Gorman <mgorman@suse.de>
Cc: Wei Liu <wei.liu2@citrix.com>,
linux-mm@kvack.org, xen-devel@lists.xenproject.org,
"H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>,
David Vrabel <david.vrabel@citrix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Cyrill Gorcunov <gorcunov@openvz.org>,
Hugh Dickins <hughd@google.com>, Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH RFC] x86,mm: use _PAGE_BIT_SOFTW2 as _PAGE_BIT_NUMA
Date: Fri, 7 Nov 2014 10:45:32 +0000 [thread overview]
Message-ID: <20141107104531.GA28188@zion.uk.xensource.com> (raw)
In-Reply-To: <20141107085210.GW21422@suse.de>
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
> > _PAGE_NUMA_MASK and SWP_OFFSET_SHIFT as needed.
> >
> > Suggested-by: David Vrabel <david.vrabel@citrix.com>
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
>
> 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.
Wei.
> --
> Mel Gorman
> SUSE Labs
--
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:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2014-11-07 10:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 17:48 Wei Liu
2014-11-07 8:52 ` Mel Gorman
2014-11-07 10:45 ` Wei Liu [this message]
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=20141107104531.GA28188@zion.uk.xensource.com \
--to=wei.liu2@citrix.com \
--cc=akpm@linux-foundation.org \
--cc=david.vrabel@citrix.com \
--cc=gorcunov@openvz.org \
--cc=hpa@zytor.com \
--cc=hughd@google.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=riel@redhat.com \
--cc=xen-devel@lists.xenproject.org \
/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