Re: [patch, v2.6.22-rc6] sys_time() speedup
From: Jesper Juhl
Date: Mon Jun 25 2007 - 18:20:45 EST
On 26/06/07, Roman Zippel <zippel@xxxxxxxxxxxxxx> wrote:
On Mon, 25 Jun 2007, Jesper Juhl wrote:
> > On Monday 25 June 2007, Ingo Molnar wrote:
> > > the patch improves the sysbench OLTP macrobenchmark significantly:
> > Has that any real practical relevance?
> It seems to me that Ingo's patch offers slightly improved performance
> for any program using the time() system call, with no real drawbacks,
> so why wouldn't we want to use it?
How do you come to the conclusion it has no real drawbacks?
His change to do_gettimeofday() will of course slow that path down a
tiny bit since he's adding an extra 'if', but since it's wrapped in
unlikely() and should hit at most one time pr second I would guess the
performance impact of that to be negligible.
The change to sys_time() does away with some local variables and
replaces the call to do_gettimeofday() with a memory barrier and a
simple read of xtime.tv_se. I find it hard to believe (although I have
not tested it) that that wouldn't be faster than the original.
So that's how I came to that conclusion; just reading the patch, going
over what it does in my head and thinking about it a bit. Not the
most scientific of things I admit.
Even if it is not faster, what would make it slower? Have you spotted
something I have not?
Ingo provided no information about his test setup and his patch was aWhat did you find strange about it? I'm currious.
little strange, so I can't say that yet.
Sure it needs testing and of course it would be nice with some more
details on Ingo's test setup.
Jesper Juhl <jesper.juhl@xxxxxxxxx>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
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/