lkml.org 
[lkml]   [2020]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [GIT PULL] x86/mm changes for v5.8
Date
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.
\
 
 \ /
  Last update: 2020-06-02 20:29    [W:0.076 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site