Re: [patch, v2.6.22-rc6] sys_time() speedup

From: Andrew Morton
Date: Tue Jun 26 2007 - 13:36:14 EST


On Tue, 26 Jun 2007 19:08:27 +0200 (CEST) Roman Zippel <zippel@xxxxxxxxxxxxxx> wrote:

> > This current ... interesting piece of Roman about a _single_ trivial
> > unlikely() branch in do_gettimeofday() borders on the ridiculous. My
> > patch might be wrong for various reasons, but that single
> > 'if (unlikely())' statement is not one of those reasons =B-)
>
> That's even more nonsense, that wasn't what my mail was about and Andrew
> understood me correctly, so you could have too.

umm, yeah. Ingo went a bit over the top there, IMO.

It boils down to: is sys_time() called at more or less than 1/2000th the
frequency of gettimeofday(), across the expected lifetime of 2.6.23 and
later? Ingo has a couple of (surprising) examples where the sys_time()
call frequency _is_ high, but whether that will remain true across 2.6.23
and later is an open question.

How does mysql call sys_time() at all, if time(2) uses the vsyscall page??

Will contemporary-to-2.6.23-and-later mysqls do this?

All this isn't super-trivial silliness, either. gettimeofday() is, for
many workloads, the kernel's most time-critical codepath bar none, I
believe.

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