From: Thomas Gleixner <tglx@linutronix.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Ingo Molnar <mingo@kernel.org>, Balbir Singh <sblbir@amazon.com>
Cc: torvalds@linux-foundation.org, a.p.zijlstra@chello.nl,
akpm@linux-foundation.org, bp@alien8.de,
linux-kernel@vger.kernel.org, luto@kernel.org
Subject: Re: [GIT PULL] x86/mm changes for v5.8
Date: Tue, 02 Jun 2020 20:28:50 +0200 [thread overview]
Message-ID: <871rmxgw4d.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <b159ba4c53fcf04cc4eb747c45e1d4d2d83310a3.camel@kernel.crashing.org>
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> On Tue, 2020-06-02 at 09:33 +0200, Ingo Molnar wrote:
>> Or rather, we should ask a higher level question as well, maybe we
>> should not do this feature at all?
>
> Well, it does solve a real issue in some circumstances and there was a
> reasonable discussion about this on the list that lead to it being
> merged with Kees and Thomas (and others) agreeing :)
>
> But yes, it is pointless with SMT and yes maybe we should make it
> explicitly do nothing on SMT, but let's not throw the baby out with the
> bath water shall we ?
It's trivial enough to fix. We have a static key already which is
telling us whether SMT scheduling is active.
Thanks,
tglx
---
arch/x86/mm/tlb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -8,6 +8,7 @@
#include <linux/export.h>
#include <linux/cpu.h>
#include <linux/debugfs.h>
+#include <linux/sched/smt.h>
#include <asm/tlbflush.h>
#include <asm/mmu_context.h>
@@ -457,7 +458,7 @@ static void cond_mitigation(struct task_
indirect_branch_prediction_barrier();
}
- if (prev_mm & LAST_USER_MM_L1D_FLUSH) {
+ if (!sched_smt_active() && prev_mm & LAST_USER_MM_L1D_FLUSH) {
/*
* Don't populate the TLB for the software fallback flush.
* Populate TLB is not needed for this use case.
next prev parent reply other threads:[~2020-06-02 18:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 17:01 Ingo Molnar
2020-06-01 21:42 ` Linus Torvalds
2020-06-02 2:35 ` Linus Torvalds
2020-06-02 10:25 ` Singh, Balbir
2020-06-02 7:33 ` Ingo Molnar
2020-06-02 9:37 ` Benjamin Herrenschmidt
2020-06-02 18:28 ` Thomas Gleixner [this message]
2020-06-02 19:14 ` Linus Torvalds
2020-06-02 23:01 ` Singh, Balbir
2020-06-02 23:28 ` Linus Torvalds
2020-06-03 1:31 ` Singh, Balbir
2020-06-04 17:29 ` [GIT PULL v2] " Ingo Molnar
2020-06-05 2:41 ` Linus Torvalds
2020-06-05 8:11 ` [GIT PULL v3] " Ingo Molnar
2020-06-05 20:40 ` pr-tracker-bot
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=871rmxgw4d.fsf@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=sblbir@amazon.com \
--cc=torvalds@linux-foundation.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
Powered by JetHome