kernel_optimize_test/arch/um/kernel
Frederic Weisbecker 280f06774a nohz: Separate out irq exit and idle loop dyntick logic
The tick_nohz_stop_sched_tick() function, which tries to delay
the next timer tick as long as possible, can be called from two
places:

- From the idle loop to start the dytick idle mode
- From interrupt exit if we have interrupted the dyntick
idle mode, so that we reprogram the next tick event in
case the irq changed some internal state that requires this
action.

There are only few minor differences between both that
are handled by that function, driven by the ts->inidle
cpu variable and the inidle parameter. The whole guarantees
that we only update the dyntick mode on irq exit if we actually
interrupted the dyntick idle mode, and that we enter in RCU extended
quiescent state from idle loop entry only.

Split this function into:

- tick_nohz_idle_enter(), which sets ts->inidle to 1, enters
dynticks idle mode unconditionally if it can, and enters into RCU
extended quiescent state.

- tick_nohz_irq_exit() which only updates the dynticks idle mode
when ts->inidle is set (ie: if tick_nohz_idle_enter() has been called).

To maintain symmetry, tick_nohz_restart_sched_tick() has been renamed
into tick_nohz_idle_exit().

This simplifies the code and micro-optimize the irq exit path (no need
for local_irq_save there). This also prepares for the split between
dynticks and rcu extended quiescent state logics. We'll need this split to
further fix illegal uses of RCU in extended quiescent states in the idle
loop.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: David Miller <davem@davemloft.net>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2011-12-11 10:31:35 -08:00
..
skas um: distribute exports to where exported stuff is defined 2011-11-02 14:15:36 +01:00
asm-offsets.c
config.c.in
dyn.lds.S uml: fix CONFIG_STATIC_LINK=y build failure with newer glibc 2010-10-26 16:52:12 -07:00
early_printk.c um: add earlyprintk support 2011-05-25 08:39:41 -07:00
exec.c um: distribute exports to where exported stuff is defined 2011-11-02 14:15:36 +01:00
exitcode.c
gmon_syms.c um: fix gcov build breakage 2011-11-02 14:15:26 +01:00
gprof_syms.c
init_task.c
initrd.c um: make load_initrd() static, kill shared/initrd.h 2011-11-02 14:15:06 +01:00
internal.h uml: fix compile warning 2010-09-22 17:22:39 -07:00
irq.c um: distribute exports to where exported stuff is defined 2011-11-02 14:15:36 +01:00
ksyms.c um: distribute exports to where exported stuff is defined 2011-11-02 14:15:36 +01:00
Makefile um: kill dead code around uaccess 2011-11-02 14:14:52 +01:00
mem.c um: distribute exports to where exported stuff is defined 2011-11-02 14:15:36 +01:00
physmem.c um: distribute exports to where exported stuff is defined 2011-11-02 14:15:36 +01:00
process.c nohz: Separate out irq exit and idle loop dyntick logic 2011-12-11 10:31:35 -08:00
ptrace.c um: clean arch_ptrace() up a bit 2011-09-14 18:09:37 -07:00
reboot.c um: remove dead code 2011-07-25 20:57:13 -07:00
sigio.c
signal.c um: kill includes of sysdep/sigcontext.h from stuff built with kernel headers 2011-11-02 14:14:54 +01:00
smp.c mm: now that all old mmu_gather code is gone, remove the storage 2011-05-25 08:39:16 -07:00
syscall.c uml: fix compile warning 2010-09-22 17:22:39 -07:00
sysrq.c
time.c um: Fix read_persistent_clock fallout 2010-08-03 20:36:07 +02:00
tlb.c um: distribute exports to where exported stuff is defined 2011-11-02 14:15:36 +01:00
trap.c um: distribute exports to where exported stuff is defined 2011-11-02 14:15:36 +01:00
um_arch.c um: distribute exports to where exported stuff is defined 2011-11-02 14:15:36 +01:00
umid.c
uml.lds.S uml: fix CONFIG_STATIC_LINK=y build failure with newer glibc 2010-10-26 16:52:12 -07:00
vmlinux.lds.S