x86/mm/cpa: Unconditionally avoid WBINDV when we can
PATCH 1/1 x86/mm/cpa: Unconditionally avoid WBINDV when we can
From: Peter Zijlstra <[email protected]>
commit ab3e9c0b75dcb13e9254ef68caa7f15bc66b6471 upstream.
CAT has happened, WBINDV is bad (even before CAT blowing away the entire cache on a multi-core platform wasn't nice), try not to use it ever.
--- arch/x86/mm/pageattr.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-)
arch/x86/mm/pageattr.c +2 -16
@@ -239,26 +239,12 @@ static void cpa_flush_array(unsigned long *start, int numpages, int cache, int in_flags, struct page **pages) {unsigned int i, level; -#ifdef CONFIG_PREEMPT -/* -* Avoid wbinvd() because it causes latencies on all CPUs, -* regardless of any CPU isolation that may be in effect. -* -* This should be extended for CAT enabled systems independent of -* PREEMPT because wbinvd() does not respect the CAT partitions and -* this is exposed to unpriviledged users through the graphics -* subsystem. -*/ -unsigned long do_wbinvd =0 ; -#else -unsigned long do_wbinvd = cache && numpages >=1024 ;/* 4M threshold */ -#endif BUG_ON (irqs_disabled () && !early_boot_irqs_disabled); -on_each_cpu (__cpa_flush_all, (void *) do_wbinvd,1 ); +flush_tlb_all (); -if (!cache || do_wbinvd) +if (!cache)return ;/*
Signature · 1 line
2.19.1.6.gb485710b
Greg Kroah-Hartman
maintainerQuoted 3 lines · Wen Yang
From: Peter Zijlstra <[email protected]>
commit
ab3e9c0b75dcb13e9254ef68caa7f15bc66b6471upstream.
This commit id is not in Linus's tree :(
Quoted 6 lines · Greg Kroah-Hartman
Quoted 3 lines · Wen Yang
From: Peter Zijlstra <[email protected]>
commit
ab3e9c0b75dcb13e9254ef68caa7f15bc66b6471upstream.This commit id is not in Linus's tree :(
Sorry, accidentally added the internal id.
It is this commit id in Linus' tree:ddd07b750382adc2b78fdfbec47af8a6e0d8ef37
--
Best wishes,
Wen
Greg Kroah-Hartman
maintainerQuoted 11 lines · Wen Yang
Quoted 6 lines · Greg Kroah-Hartman
Quoted 3 lines · Wen Yang
From: Peter Zijlstra <[email protected]>
commit
ab3e9c0b75dcb13e9254ef68caa7f15bc66b6471upstream.This commit id is not in Linus's tree :(
Quoted 6 lines
Sorry, accidentally added the internal id.
It is this commit id in Linus' tree:
ddd07b750382adc2b78fdfbec47af8a6e0d8ef37
Please fix up the patch and resend it with this information.
thanks,
greg k-h