All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Nicholas Piggin <npiggin@gmail.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Cc: Bharata B Rao <bharata@linux.ibm.com>
Subject: Re: [PATCH] powerpc/book3s64/radix/tlb: Determine hugepage flush correctly
Date: Mon, 18 May 2020 16:34:45 +1000	[thread overview]
Message-ID: <87ftbxagze.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <1589344088.xrvol2hteg.astroid@bobo.none>

Nicholas Piggin <npiggin@gmail.com> writes:
> Excerpts from Aneesh Kumar K.V's message of May 13, 2020 1:06 pm:
>> With a 64K page size flush with start and end value as below
>> (start, end) = (721f680d0000, 721f680e0000) results in
>> (hstart, hend) = (721f68200000, 721f68000000)
>> 
>> Avoid doing a __tlbie_va_range with the wrong hstart and hend value in this
>> case.
>> 
>> __tlbie_va_range will skip the actual tlbie operation for start > end.
>> But we still end up doing the tlbie fixup.
>
> Hm, good catch.
>
>> Reported-by: Bharata B Rao <bharata@linux.ibm.com>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
>> ---
>>  arch/powerpc/mm/book3s64/radix_tlb.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>> 
>> diff --git a/arch/powerpc/mm/book3s64/radix_tlb.c b/arch/powerpc/mm/book3s64/radix_tlb.c
>> index 758ade2c2b6e..d592f9e1c037 100644
>> --- a/arch/powerpc/mm/book3s64/radix_tlb.c
>> +++ b/arch/powerpc/mm/book3s64/radix_tlb.c
>> @@ -884,10 +884,10 @@ static inline void __radix__flush_tlb_range(struct mm_struct *mm,
>>  		if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) {
>>  			hstart = (start + PMD_SIZE - 1) & PMD_MASK;
>>  			hend = end & PMD_MASK;
>> -			if (hstart == hend)
>> -				hflush = false;
>> -			else
>> +			if (hstart < hend)
>>  				hflush = true;
>> +			else
>> +				hflush = false;
>
> We can probably get rid of the else part since it is already false.

Yeah I can do that when applying.

cheers

  reply	other threads:[~2020-05-18  6:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13  3:06 [PATCH] powerpc/book3s64/radix/tlb: Determine hugepage flush correctly Aneesh Kumar K.V
2020-05-13  4:30 ` Nicholas Piggin
2020-05-18  6:34   ` Michael Ellerman [this message]
2020-06-09  5:28 ` Michael Ellerman

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=87ftbxagze.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=bharata@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.