linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org, paulus@samba.org
Subject: Re: [PATCH] powerpc/mm: numa pte should be handled via slow path in get_user_pages_fast
Date: Mon, 07 Apr 2014 13:08:25 +0530	[thread overview]
Message-ID: <87eh19si6m.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1396828173.3671.22.camel@pasglop>

Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:

> On Wed, 2014-04-02 at 21:37 +0530, Aneesh Kumar K.V wrote:
>> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
>> 
>> We need to handle numa pte via the slow path
>
> Is this -stable material ? If yes how far back ?

I am not sure we really need to backport this. We got numa faulting bits
in 3.14. Currently there are two out-standing patches. One is this and
the other. http://mid.gmane.org/1390292129-15871-1-git-send-email-pingfank@linux.vnet.ibm.com

powernv: kvm: make _PAGE_NUMA take effect

I would not consider them critical enough to impact the general user of
3.14 kernel.

-aneesh

>
> Cheers,
> Ben.
>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>> ---
>>  arch/powerpc/mm/gup.c | 13 +++++++++++++
>>  1 file changed, 13 insertions(+)
>> 
>> diff --git a/arch/powerpc/mm/gup.c b/arch/powerpc/mm/gup.c
>> index c5f734e20b0f..d8746684f606 100644
>> --- a/arch/powerpc/mm/gup.c
>> +++ b/arch/powerpc/mm/gup.c
>> @@ -36,6 +36,11 @@ static noinline int gup_pte_range(pmd_t pmd, unsigned long addr,
>>  	do {
>>  		pte_t pte = ACCESS_ONCE(*ptep);
>>  		struct page *page;
>> +		/*
>> +		 * Similar to the PMD case, NUMA hinting must take slow path
>> +		 */
>> +		if (pte_numa(pte))
>> +			return 0;
>>  
>>  		if ((pte_val(pte) & mask) != result)
>>  			return 0;
>> @@ -75,6 +80,14 @@ static int gup_pmd_range(pud_t pud, unsigned long addr, unsigned long end,
>>  		if (pmd_none(pmd) || pmd_trans_splitting(pmd))
>>  			return 0;
>>  		if (pmd_huge(pmd) || pmd_large(pmd)) {
>> +			/*
>> +			 * NUMA hinting faults need to be handled in the GUP
>> +			 * slowpath for accounting purposes and so that they
>> +			 * can be serialised against THP migration.
>> +			 */
>> +			if (pmd_numa(pmd))
>> +				return 0;
>> +
>>  			if (!gup_hugepte((pte_t *)pmdp, PMD_SIZE, addr, next,
>>  					 write, pages, nr))
>>  				return 0;

      reply	other threads:[~2014-04-07  7:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-02 16:07 [PATCH] powerpc/mm: numa pte should be handled via slow path in get_user_pages_fast Aneesh Kumar K.V
2014-04-06 23:49 ` Benjamin Herrenschmidt
2014-04-07  7:38   ` Aneesh Kumar K.V [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=87eh19si6m.fsf@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).