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

From: Ingo Molnar
Date: Fri May 06 2011 - 06:23:07 EST



* Thomas Gleixner <tglx@xxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/