Re: [PATCH RFC v3] x86,mm,sched: make lazy TLB mode even lazier

From: Rik van Riel
Date: Mon Aug 29 2016 - 11:24:29 EST


On Sat, 2016-08-27 at 10:03 +0200, Ingo Molnar wrote:
> * Rik van Riel <riel@xxxxxxxxxx> wrote:
>
> > On Thu, 25 Aug 2016 12:42:15 -0700
> > "H. Peter Anvin" <hpa@xxxxxxxxx> wrote:
> >
> > > Why grabbing a lock instead of cmpxchg?
> >
> > ... and some more cleanups later, this might actually be
> > good to merge, assuming it works for Benjamin :)
> >
> > ---8<---
>
> LGTM in principle (it's a pretty clever trick!), just some minor
> stylistic nits:

Thanks for the review. I have applied the stylistic nits, and
turned lazy_tlb_can_skip_flush into a big switch statement as
suggested by Linus.

> > + Â*/
> > + for_each_cpu(cpu, cpumask)
> > + if (lazy_tlb_can_skip_flush(cpu))
> > + cpumask_clear_cpu(cpu, (struct cpumask
> > *)cpumask);
>
> Please remove the 'const' from the cpumask type definition instead of
> this uglyÂ
> cast!

I played around with this on Thursday already, and ran out of
time to clean that up before going to the next talk. This will
be fixed in the next version.Â

> I'd also like to wait for the Tested-by from Benjamin as well before
> we canÂ
> proceeed.

Agreed.

Ben, a new version is coming up real soon.

--

All Rights Reversed.

Attachment: signature.asc
Description: This is a digitally signed message part