From: Zhenzhong Duan <zhenzhong.duan@oracle.com>
To: Andy Lutomirski <luto@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
srinivas.eeda@oracle.com,
Dave Hansen <dave.hansen@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
X86 ML <x86@kernel.org>
Subject: Re: [PATCH] x86/mm/tlb: Do partial TLB flush when possible
Date: Fri, 31 May 2019 10:51:17 +0800 [thread overview]
Message-ID: <66defe09-51f1-3def-6e5a-7a9c07430f65@oracle.com> (raw)
In-Reply-To: <CALCETrU96Pjw5AEy_Aju_hMkv=QdE3YVfx5aY24B8WwDqM1A9Q@mail.gmail.com>
On 2019/5/30 22:15, Andy Lutomirski wrote:
> On Thu, May 30, 2019 at 12:56 AM Zhenzhong Duan
> <zhenzhong.duan@oracle.com> wrote:
>> This is a small optimization to stale TLB flush, if there is one new TLB
>> flush, let it choose to do partial or full flush. or else, the stale
>> flush take over and do full flush.
> I think this is invalid because:
>
>> + if (unlikely(f->new_tlb_gen <= local_tlb_gen &&
>> + local_tlb_gen + 1 == mm_tlb_gen)) {
>> + /*
>> + * For stale TLB flush request, if there will be one new TLB
>> + * flush coming, we leave the work to the new IPI as it knows
>> + * partial or full TLB flush to take, or else we do the full
>> + * flush.
>> + */
>> + trace_tlb_flush(reason, 0);
>> + return;
> We do indeed know that the TLB will get flushed eventually, but we're
> actually providing a stronger guarantee that the TLB will be
> adequately flushed by the time we return. Otherwise, after
> flush_tlb_mm_range(), there will be a window in which the TLB isn't
> flushed yet.
You are right. I didn't notice this point, sorry for the noise.
Zhenzhong
prev parent reply other threads:[~2019-05-31 2:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 7:56 [PATCH] x86/mm/tlb: Do partial TLB flush when possible Zhenzhong Duan
2019-05-30 14:15 ` Andy Lutomirski
2019-05-31 2:51 ` Zhenzhong Duan [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=66defe09-51f1-3def-6e5a-7a9c07430f65@oracle.com \
--to=zhenzhong.duan@oracle.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=srinivas.eeda@oracle.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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).