diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-09-29 14:25:16 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-11-05 07:53:53 +0100 |
commit | 3c5d92a0cfb5103c0d5ab74d4ae6373d3af38148 (patch) | |
tree | c8b50351568601428b6f9396ebfdd65e486b3097 /arch/s390/include | |
parent | eed3b9cf3fe3fcc7a50238dfcab63a63914e8f42 (diff) | |
download | blackbird-op-linux-3c5d92a0cfb5103c0d5ab74d4ae6373d3af38148.tar.gz blackbird-op-linux-3c5d92a0cfb5103c0d5ab74d4ae6373d3af38148.zip |
nohz: Introduce arch_needs_cpu
Allow the architecture to request a normal jiffy tick when the system
goes idle and tick_nohz_stop_sched_tick is called . On s390 the hook is
used to prevent the system going fully idle if there has been an
interrupt other than a clock comparator interrupt since the last wakeup.
On s390 the HiperSockets response time for 1 connection ping-pong goes
down from 42 to 34 microseconds. The CPU cost decreases by 27%.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
LKML-Reference: <20090929122533.402715150@de.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/cputime.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h index 24b1244aadb9..95f3561517c7 100644 --- a/arch/s390/include/asm/cputime.h +++ b/arch/s390/include/asm/cputime.h @@ -183,6 +183,7 @@ struct s390_idle_data { unsigned long long idle_count; unsigned long long idle_enter; unsigned long long idle_time; + int nohz_delay; }; DECLARE_PER_CPU(struct s390_idle_data, s390_idle); @@ -198,4 +199,11 @@ static inline void s390_idle_check(void) vtime_start_cpu(); } +static inline int s390_nohz_delay(int cpu) +{ + return per_cpu(s390_idle, cpu).nohz_delay != 0; +} + +#define arch_needs_cpu(cpu) s390_nohz_delay(cpu) + #endif /* _S390_CPUTIME_H */ |