diff options
| author | Ingo Molnar <mingo@elte.hu> | 2007-07-15 23:41:18 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 09:05:48 -0700 | 
| commit | 4e44f3497d41db4c3b9051c61410dee8ae4fb49c (patch) | |
| tree | 8c54919894c8f6ac629c6c28cee8fb504721d652 /kernel/lockdep_internals.h | |
| parent | f482394ccbca7234d29cc146d4a2b94f976ce5a1 (diff) | |
| download | olio-linux-3.10-4e44f3497d41db4c3b9051c61410dee8ae4fb49c.tar.xz olio-linux-3.10-4e44f3497d41db4c3b9051c61410dee8ae4fb49c.zip  | |
sys_time() speedup
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 every timer/scheduler tick, already offers HZ granularity time.
The patch improves the sysbench OLTP macrobenchmark significantly:
2.6.22-rc6:
#threads
   1:        transactions:                        3733   (373.21 per sec.)
   2:        transactions:                        6676   (667.46 per sec.)
   3:        transactions:                        6957   (695.50 per sec.)
   4:        transactions:                        7055   (705.48 per sec.)
   5:        transactions:                        6596   (659.33 per sec.)
2.6.22-rc6 + sys_time.patch:
   1:        transactions:                        4005   (400.47 per sec.)
   2:        transactions:                        7379   (737.77 per sec.)
   3:        transactions:                        7347   (734.49 per sec.)
   4:        transactions:                        7468   (746.65 per sec.)
   5:        transactions:                        7428   (742.47 per sec.)
Mixed API uses of gettimeofday() and time() are guaranteed to be coherent
via the use of a at-most-once-per-second slowpath that updates xtime.
[akpm@linux-foundation.org: build fixes]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/lockdep_internals.h')
0 files changed, 0 insertions, 0 deletions