lkml.org 
[lkml]   [2007]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch, v2.6.22-rc6] sys_time() speedup
On 26/06/07, Roman Zippel <zippel@linux-m68k.org> wrote:
> Hi,
>
> 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 a
> little strange, so I can't say that yet.
>
What did you find strange about it? I'm currious.
Sure it needs testing and of course it would be nice with some more
details on Ingo's test setup.


--
Jesper Juhl <jesper.juhl@gmail.com>
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-26 00:23    [W:0.065 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site