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

2007-06-26 Thread Andrea Arcangeli
On Tue, Jun 26, 2007 at 10:14:40AM -0700, Andrew Morton wrote: > On my machine, time(2) doesn't do any syscall at all - it uses the vsyscall > page. I'd be surprised if a database uses sys_time() either. Large boxes unfortunately can't always use vsyscalls... that's a real pity. I also had to

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

2007-06-26 Thread Andrea Arcangeli
On Tue, Jun 26, 2007 at 10:13:31AM -0700, Ray Lee wrote: > faster? Weird. It shouldn't. They must be doing something wrong, > therefore the patch is stupid." Just in case it's not obvious the above are Ray Lee words, mine not. --- #!/usr/bin/env stap # edited top.stp from systemtap

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

2007-06-26 Thread Andrew Morton
On Mon, 25 Jun 2007 15:15:08 -0700 Andrew Morton <[EMAIL PROTECTED]> wrote: > > What did you test? > > There can be many ways to read the clock, do you want to put this hook > > everywhere? > > Yeah, it isn't immediately obvious (to this little black duck) why similar > fixups weren't needed in

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

2007-06-26 Thread Andrew Morton
On Tue, 26 Jun 2007 19:08:27 +0200 (CEST) Roman Zippel <[EMAIL PROTECTED]> 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 > >

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

2007-06-26 Thread Andrew Morton
On Tue, 26 Jun 2007 17:26:29 +0200 Ingo Molnar <[EMAIL PROTECTED]> wrote: > > * Andrew Morton <[EMAIL PROTECTED]> wrote: > > > > > the patch improves the sysbench OLTP macrobenchmark significantly: > > > > > > Has that any real practical relevance? > > > > Interesting question. [...] > > i'm

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

2007-06-26 Thread Ray Lee
On 6/26/07, Andrea Arcangeli <[EMAIL PROTECTED]> wrote: On Tue, Jun 26, 2007 at 06:18:57PM +0200, Ingo Molnar wrote: > My patch improves MySQL wall-clock performance by ~10% on a dual-core > box [see the numbers i cited in my initial mail, they were ran on a T60 > with a 1.83 GHz Core2Duo] and

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

2007-06-26 Thread Roman Zippel
Hi, On Tue, 26 Jun 2007, Ingo Molnar wrote: Another BTW before someone takes this seriously: > ( whether there is any correlation between a decade long fundamental > suckage and stagnation of the Linux time and NTP subsystem and Roman's > decade long negative feedback presence in that area

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

2007-06-26 Thread john stultz
On Tue, 2007-06-26 at 16:58 +0200, Ingo Molnar wrote: > * Mark Lord <[EMAIL PROTECTED]> wrote: > > > Ingo Molnar wrote: > > >Subject: [patch] sys_time() speedup > > >From: Ingo Molnar <[EMAIL PROTECTED]> > > > > > >improve performance of sys_time(). sys_time() returns time in seconds, > > >but

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

2007-06-26 Thread Andrea Arcangeli
On Tue, Jun 26, 2007 at 06:18:57PM +0200, Ingo Molnar wrote: > My patch improves MySQL wall-clock performance by ~10% on a dual-core > box [see the numbers i cited in my initial mail, they were ran on a T60 > with a 1.83 GHz Core2Duo] and by 7% on an 8-way box: mysql isn't froznen in stone like

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

2007-06-26 Thread Roman Zippel
Hi, On Tue, 26 Jun 2007, Ingo Molnar wrote: > if you are curious why Roman's reaction to this patch was so negative: Instead of answering all the open questions, pretty much the second thing you do is to discredit me personally. :-( BTW there is a difference between critical and negative...

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

2007-06-26 Thread Ingo Molnar
* Jesper Juhl <[EMAIL PROTECTED]> wrote: > > 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

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

2007-06-26 Thread Andrea Arcangeli
On Mon, Jun 25, 2007 at 03:15:08PM -0700, Andrew Morton wrote: > Interesting question. The patch adds a new test-n-branch to gettimeofday() > so if gettimeofday() is used much more frequently than time(), we lose. I think gettimeofday is generally used much more frequently than time. Real db

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

2007-06-26 Thread Ingo Molnar
* Andrew Morton <[EMAIL PROTECTED]> wrote: > > > the patch improves the sysbench OLTP macrobenchmark significantly: > > > > Has that any real practical relevance? > > Interesting question. [...] i'm missing the tag i guess ;-) Oh my, does database macro-performance have any relevance to

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

2007-06-26 Thread Ingo Molnar
* Mark Lord <[EMAIL PROTECTED]> wrote: > Ingo Molnar wrote: > >Subject: [patch] sys_time() speedup > >From: Ingo Molnar <[EMAIL PROTECTED]> > > > >improve performance of sys_time(). sys_time() returns time in seconds, > >but it does so by calling do_gettimeofday() and then returning the >

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

2007-06-26 Thread Ingo Molnar
* Mark Lord [EMAIL PROTECTED] wrote: Ingo Molnar wrote: Subject: [patch] sys_time() speedup From: Ingo Molnar [EMAIL PROTECTED] improve performance of sys_time(). sys_time() returns time in seconds, but it does so by calling do_gettimeofday() and then returning the tv_sec portion of

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

2007-06-26 Thread Ingo Molnar
* Andrew Morton [EMAIL PROTECTED] wrote: the patch improves the sysbench OLTP macrobenchmark significantly: Has that any real practical relevance? Interesting question. [...] i'm missing the sarcastic tag i guess ;-) sarcastic Oh my, does database macro-performance have any

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

2007-06-26 Thread Andrea Arcangeli
On Mon, Jun 25, 2007 at 03:15:08PM -0700, Andrew Morton wrote: Interesting question. The patch adds a new test-n-branch to gettimeofday() so if gettimeofday() is used much more frequently than time(), we lose. I think gettimeofday is generally used much more frequently than time. Real db calls

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

2007-06-26 Thread Ingo Molnar
* Jesper Juhl [EMAIL PROTECTED] wrote: 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

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

2007-06-26 Thread Roman Zippel
Hi, On Tue, 26 Jun 2007, Ingo Molnar wrote: if you are curious why Roman's reaction to this patch was so negative: Instead of answering all the open questions, pretty much the second thing you do is to discredit me personally. :-( BTW there is a difference between critical and negative...

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

2007-06-26 Thread Andrea Arcangeli
On Tue, Jun 26, 2007 at 06:18:57PM +0200, Ingo Molnar wrote: My patch improves MySQL wall-clock performance by ~10% on a dual-core box [see the numbers i cited in my initial mail, they were ran on a T60 with a 1.83 GHz Core2Duo] and by 7% on an 8-way box: mysql isn't froznen in stone like

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

2007-06-26 Thread john stultz
On Tue, 2007-06-26 at 16:58 +0200, Ingo Molnar wrote: * Mark Lord [EMAIL PROTECTED] wrote: Ingo Molnar wrote: Subject: [patch] sys_time() speedup From: Ingo Molnar [EMAIL PROTECTED] improve performance of sys_time(). sys_time() returns time in seconds, but it does so by calling

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

2007-06-26 Thread Roman Zippel
Hi, On Tue, 26 Jun 2007, Ingo Molnar wrote: Another BTW before someone takes this seriously: ( whether there is any correlation between a decade long fundamental suckage and stagnation of the Linux time and NTP subsystem and Roman's decade long negative feedback presence in that area of

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

2007-06-26 Thread Ray Lee
On 6/26/07, Andrea Arcangeli [EMAIL PROTECTED] wrote: On Tue, Jun 26, 2007 at 06:18:57PM +0200, Ingo Molnar wrote: My patch improves MySQL wall-clock performance by ~10% on a dual-core box [see the numbers i cited in my initial mail, they were ran on a T60 with a 1.83 GHz Core2Duo] and by 7%

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

2007-06-26 Thread Andrew Morton
On Tue, 26 Jun 2007 17:26:29 +0200 Ingo Molnar [EMAIL PROTECTED] wrote: * Andrew Morton [EMAIL PROTECTED] wrote: the patch improves the sysbench OLTP macrobenchmark significantly: Has that any real practical relevance? Interesting question. [...] i'm missing the sarcastic

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

2007-06-26 Thread Andrew Morton
On Tue, 26 Jun 2007 19:08:27 +0200 (CEST) Roman Zippel [EMAIL PROTECTED] 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

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

2007-06-26 Thread Andrew Morton
On Mon, 25 Jun 2007 15:15:08 -0700 Andrew Morton [EMAIL PROTECTED] wrote: What did you test? There can be many ways to read the clock, do you want to put this hook everywhere? Yeah, it isn't immediately obvious (to this little black duck) why similar fixups weren't needed in

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

2007-06-26 Thread Andrea Arcangeli
On Tue, Jun 26, 2007 at 10:13:31AM -0700, Ray Lee wrote: faster? Weird. It shouldn't. They must be doing something wrong, therefore the patch is stupid. Just in case it's not obvious the above are Ray Lee words, mine not. --- #!/usr/bin/env stap # edited top.stp from systemtap

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

2007-06-26 Thread Andrea Arcangeli
On Tue, Jun 26, 2007 at 10:14:40AM -0700, Andrew Morton wrote: On my machine, time(2) doesn't do any syscall at all - it uses the vsyscall page. I'd be surprised if a database uses sys_time() either. Large boxes unfortunately can't always use vsyscalls... that's a real pity. I also had to

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

2007-06-25 Thread Stephen Rothwell
On Mon, 25 Jun 2007 15:15:08 -0700 Andrew Morton <[EMAIL PROTECTED]> wrote: > > On Mon, 25 Jun 2007 23:09:46 +0200 > Roman Zippel <[EMAIL PROTECTED]> wrote: > > > On Monday 25 June 2007, Ingo Molnar wrote: > > > > > the patch improves the sysbench OLTP macrobenchmark significantly: > > > > Has

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

2007-06-25 Thread Mark Lord
Ingo Molnar wrote: Subject: [patch] sys_time() speedup From: Ingo Molnar <[EMAIL PROTECTED]> improve performance of sys_time(). sys_time() returns time in seconds, but it does so by calling do_gettimeofday() and then returning the tv_sec portion of the GTOD time. But the data structure

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

2007-06-25 Thread Roman Zippel
Hi, On Tue, 26 Jun 2007, Jesper Juhl wrote: > Even if it is not faster, what would make it slower? Have you spotted > something I have not? There are other ways to read the clock and would require similiar synchronization hooks. Some archs can implement sys_time() in userspace, so there this

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

2007-06-25 Thread Jesper Juhl
On 26/06/07, Roman Zippel <[EMAIL PROTECTED]> 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

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

2007-06-25 Thread Andrew Morton
On Mon, 25 Jun 2007 23:09:46 +0200 Roman Zippel <[EMAIL PROTECTED]> wrote: > Hi, > > On Monday 25 June 2007, Ingo Molnar wrote: > > > the patch improves the sysbench OLTP macrobenchmark significantly: > > Has that any real practical relevance? Interesting question. The patch adds a new

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

2007-06-25 Thread Eric Dumazet
Ingo Molnar a écrit : Subject: [patch] sys_time() speedup From: Ingo Molnar <[EMAIL PROTECTED]> improve performance of sys_time(). sys_time() returns time in seconds, but it does so by calling do_gettimeofday() and then returning the tv_sec portion of the GTOD time. But the data structure

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

2007-06-25 Thread Roman Zippel
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 >

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

2007-06-25 Thread Jesper Juhl
On 25/06/07, Roman Zippel <[EMAIL PROTECTED]> wrote: Hi, 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

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

2007-06-25 Thread Roman Zippel
Hi, On Monday 25 June 2007, Ingo Molnar wrote: > the patch improves the sysbench OLTP macrobenchmark significantly: Has that any real practical relevance? > @@ -373,6 +376,20 @@ void do_gettimeofday (struct timeval *tv > > tv->tv_sec = sec; > tv->tv_usec = usec; > + > + /* > +

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

2007-06-25 Thread Ingo Molnar
Subject: [patch] sys_time() speedup From: Ingo Molnar <[EMAIL PROTECTED]> improve performance of sys_time(). sys_time() returns time in seconds, but it does so by calling do_gettimeofday() and then returning the tv_sec portion of the GTOD time. But the data structure "xtime", which is updated

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

2007-06-25 Thread Ingo Molnar
Subject: [patch] sys_time() speedup From: Ingo Molnar [EMAIL PROTECTED] improve performance of sys_time(). sys_time() returns time in seconds, but it does so by calling do_gettimeofday() and then returning the tv_sec portion of the GTOD time. But the data structure xtime, which is updated by

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

2007-06-25 Thread Roman Zippel
Hi, On Monday 25 June 2007, Ingo Molnar wrote: the patch improves the sysbench OLTP macrobenchmark significantly: Has that any real practical relevance? @@ -373,6 +376,20 @@ void do_gettimeofday (struct timeval *tv tv-tv_sec = sec; tv-tv_usec = usec; + + /* + *

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

2007-06-25 Thread Jesper Juhl
On 25/06/07, Roman Zippel [EMAIL PROTECTED] wrote: Hi, 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

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

2007-06-25 Thread Roman Zippel
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

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

2007-06-25 Thread Eric Dumazet
Ingo Molnar a écrit : Subject: [patch] sys_time() speedup From: Ingo Molnar [EMAIL PROTECTED] improve performance of sys_time(). sys_time() returns time in seconds, but it does so by calling do_gettimeofday() and then returning the tv_sec portion of the GTOD time. But the data structure

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

2007-06-25 Thread Andrew Morton
On Mon, 25 Jun 2007 23:09:46 +0200 Roman Zippel [EMAIL PROTECTED] wrote: Hi, On Monday 25 June 2007, Ingo Molnar wrote: the patch improves the sysbench OLTP macrobenchmark significantly: Has that any real practical relevance? Interesting question. The patch adds a new test-n-branch

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

2007-06-25 Thread Jesper Juhl
On 26/06/07, Roman Zippel [EMAIL PROTECTED] 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

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

2007-06-25 Thread Roman Zippel
Hi, On Tue, 26 Jun 2007, Jesper Juhl wrote: Even if it is not faster, what would make it slower? Have you spotted something I have not? There are other ways to read the clock and would require similiar synchronization hooks. Some archs can implement sys_time() in userspace, so there this

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

2007-06-25 Thread Mark Lord
Ingo Molnar wrote: Subject: [patch] sys_time() speedup From: Ingo Molnar [EMAIL PROTECTED] improve performance of sys_time(). sys_time() returns time in seconds, but it does so by calling do_gettimeofday() and then returning the tv_sec portion of the GTOD time. But the data structure xtime,

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

2007-06-25 Thread Stephen Rothwell
On Mon, 25 Jun 2007 15:15:08 -0700 Andrew Morton [EMAIL PROTECTED] wrote: On Mon, 25 Jun 2007 23:09:46 +0200 Roman Zippel [EMAIL PROTECTED] wrote: On Monday 25 June 2007, Ingo Molnar wrote: the patch improves the sysbench OLTP macrobenchmark significantly: Has that any real