lkml.org 
[lkml]   [2020]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 3/5] x86/mm: Optionally flush L1D on context switch
Date
On Fri, Nov 27 2020 at 17:59, Balbir Singh wrote:
>
> + /*
> + * Flush only if SMT is disabled as per the contract, which is checked
> + * when the feature is enabled.
> + */
> + if (sched_smt_active() && !this_cpu_read(cpu_info.smt_active) &&
> + (prev_mm & LAST_USER_MM_L1D_FLUSH))
> + l1d_flush_hw();

So if SMT is completely disabled then no flush? Shouldn't the logic be:

if ((!sched_smt_active() || !this_cpu_read(cpu_info.smt_active) &&
(prev_mm & LAST_USER_MM_L1D_FLUSH))

Hmm?

But that's bad, because it's lot's of conditions to evaluate for every
switch_mm where most of them are not interested in it at all.

Let me read through the rest of the pile.

Thanks,

tglx


\
 
 \ /
  Last update: 2020-12-04 22:24    [W:0.072 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site