Re: [patch V6 10/14] MDS basics 10

Thomas Gleixner <[email protected]>
Newsgroups org.kernel.lore.historical-speck
Message-ID <[email protected]>
Andrea,

On Tue, 5 Mar 2019, speck for Andrea Arcangeli wrote:

> 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?

Not sure.

> 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.

True and as usual we don't really know what people are doing and wreckaging
existing applications which rely on that would be not nice.

Thanks,

	tglx
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.