Re: [RFC] time: xtime_lock is held too long

Ingo Molnar
2011-05-06T10:23:02Z

* Thomas Gleixner <tglx@linutronix.de> wrote:

> On Thu, 5 May 2011, Andi Kleen wrote:
>
> > > > Another idea would be to prime cache lines to be dirtied in cpu cache
> > > > before taking locks, and better pack variables to reduce number of cache
> > > > lines.
> > >
> > > Most variables are packed already in struct timekeeper, which should
> > > be pretty cache hot anyway, so I don't know whether we gain much.
> >
> > There's actually some potential here. I got a moderate speedup in a
> > database benchmark with this patch recently. The biggest win
>
> Numbers please.

I'd suggest to create and publish a seqlock usage worst-case testcase,
something that runs N threads on an N CPU system.

Then precise measurements have to be done on the source of cache misses, the
total cost of the timer interrupt, etc.

I.e. this should be analyzed and improved properly, not just sloppily slapping
a few prefetches here and there, which wont really *solve* anything ...

Thanks,

Ingo