[MODERATED] Re: [patch V6 10/14] MDS basics 10
Andrea Arcangeli <[email protected]>
| Newsgroups | org.kernel.lore.historical-speck |
|---|---|
| Message-ID | <[email protected]> |
Hi Thomas,
On Fri, Mar 01, 2019 at 10:47:48PM +0100, speck for Thomas Gleixner wrote:
> +/* Update the static key controlling the MDS CPU buffer clear in idle */
> +static void update_mds_branch_idle(void)
> +{
> + /*
> + * Enable the idle clearing on CPUs which are affected only by
> + * MDBDS and not any other MDS variant. The other variants cannot
> + * be mitigated when SMT is enabled, so clearing the buffers on
> + * idle would be a window dressing exercise.
> + */
> + if (!boot_cpu_has(X86_BUG_MSBDS_ONLY))
> + return;
> +
> + if (sched_smt_active())
> + static_branch_enable(&mds_idle_clear);
Do you think it's worth also clearing
MSR_MISC_FEATURES_ENABLES_RING3MWAIT_BIT by setting
ring3mwait_disabled when sched_smt_active() is true above?
I don't expect anybody will pass manually ring3mwait=disable to the
kernel on XEON_PHI_KNL/XEON_PHI_KNM. I'm not aware of any app using
the user mwait, which also makes this not a big deal.. but it goes
both ways, it's also not a big deal for userland to turn it off when
we report SMT is enabled and safe in sysfs.
Thanks,
Andrea