1
0
Fork 0
alistair23-linux/kernel/time
Ingo Molnar f20bf61256 time: introduce xtime_seconds
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 by 4-5% on an AMD
dual-core system:

v2.6.23:

#threads

   1:     transactions:                        4073   (407.23 per sec.)
   2:     transactions:                        8530   (852.81 per sec.)
   3:     transactions:                        8321   (831.88 per sec.)
   4:     transactions:                        8407   (840.58 per sec.)
   5:     transactions:                        8070   (806.74 per sec.)

v2.6.23 + sys_time-speedup.patch:

   1:     transactions:                        4281   (428.09 per sec.)
   2:     transactions:                        8910   (890.85 per sec.)
   3:     transactions:                        8659   (865.79 per sec.)
   4:     transactions:                        8676   (867.34 per sec.)
   5:     transactions:                        8532   (852.91 per sec.)

and by 4-5% on an Intel dual-core system too:

2.6.23:

  1:     transactions:                        4560   (455.94 per sec.)
  2:     transactions:                        10094  (1009.30 per sec.)
  3:     transactions:                        9755   (975.36 per sec.)
  4:     transactions:                        9859   (985.78 per sec.)
  5:     transactions:                        9701   (969.72 per sec.)

2.6.23 + sys_time-speedup.patch:

  1:     transactions:                        4779   (477.84 per sec.)
  2:     transactions:                        10103  (1010.14 per sec.)
  3:     transactions:                        10141  (1013.93 per sec.)
  4:     transactions:                        10371  (1036.89 per sec.)
  5:     transactions:                        10178  (1017.50 per sec.)

(the more CPUs the system has, the more speedup this patch gives for
this particular workload.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16 10:01:50 -07:00
..
Kconfig clockevents: Allow build w/o run-tine usage for migration purposes 2007-10-12 23:04:05 +02:00
Makefile clockevents: Allow build w/o run-tine usage for migration purposes 2007-10-12 23:04:05 +02:00
clockevents.c clockevents: Allow build w/o run-tine usage for migration purposes 2007-10-12 23:04:05 +02:00
clocksource.c clocksource: fix lock order in the resume path 2007-05-15 08:54:00 -07:00
jiffies.c [PATCH] fix jiffies clocksource inittime 2007-04-04 21:12:47 -07:00
ntp.c Fix "no_sync_cmos_clock" logic inversion in kernel/time/ntp.c 2007-09-11 17:21:27 -07:00
tick-broadcast.c clockevents: introduce force broadcast notifier 2007-10-14 22:57:45 +02:00
tick-common.c clockevents: introduce force broadcast notifier 2007-10-14 22:57:45 +02:00
tick-internal.h highres/dyntick: prevent xtime lock contention 2007-05-08 11:15:10 -07:00
tick-oneshot.c highres: improve debug output 2007-07-21 17:49:15 -07:00
tick-sched.c clockevents: prevent stale tick update on offline cpu 2007-09-16 15:36:43 +02:00
timekeeping.c time: introduce xtime_seconds 2007-10-16 10:01:50 -07:00
timer_list.c Fix leaks on /proc/{*/sched,sched_debug,timer_list,timer_stats} 2007-07-31 15:39:40 -07:00
timer_stats.c Fix timer_stats printout of events/sec 2007-10-07 16:28:43 -07:00