Re: [PATCH 0/6] x86-64: Micro-optimize vclock_gettime
From: Andi Kleen
Date: Wed Apr 06 2011 - 16:14:50 EST
On Wed, Apr 06, 2011 at 04:10:22PM -0400, Andrew Lutomirski wrote:
> I ran Ingo's time-warp-test w/ 6, 7, and 8 threads on Sandy Bridge and
> on a Xeon 5600 series chip. My C2D laptop thinks that its TSC halts
> in idle and my only AMD system has unsynchronized TSCs.
I think you should have coverage on more systems. The original
problems that motivated the barriers were on older K8 AMD systems.
You can ask people on l-k to run such tests for you if you don't
have the hardware.
> > I did a similar attempt recently for the in kernel timers.
> > You won't see any difference in a micro benchmark loop, but you may
> > in a workload that dirties lots of cache between timer calls.
> For CLOCK_REALTIME they're already in one cache line. I tried the
> prefetch and couldn't measure a speedup even after playing with
Did you run a cache pig between the calls? With a tight loop it's obviously
> Agreed. In fact, I could do both in one fell swoop: have a flag for
> the mode and have one option be "just issue the syscall." Static
> branch stuff scares me because this stuff runs in userspace and, in
> theory, userspace might have COWed the page with this code in it.
The vdso is never cowed.
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
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/