diff options
author | Arun R Bharadwaj <arun@linux.vnet.ibm.com> | 2009-04-16 02:46:41 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-05-13 10:52:42 -0400 |
commit | eea08f32adb3f97553d49a4f79a119833036000a (patch) | |
tree | 4e6af5185309d7abe49a8fa19634ea38582381e4 /kernel/sched.c | |
parent | cd1bb94b4a0531e8211a3774f17de831f8285f76 (diff) |
timers: Logic to move non pinned timers
* Arun R Bharadwaj <arun@linux.vnet.ibm.com> [2009-04-16 12:11:36]:
This patch migrates all non pinned timers and hrtimers to the current
idle load balancer, from all the idle CPUs. Timers firing on busy CPUs
are not migrated.
While migrating hrtimers, care should be taken to check if migrating
a hrtimer would result in a latency or not. So we compare the expiry of the
hrtimer with the next timer interrupt on the target cpu and migrate the
hrtimer only if it expires *after* the next interrupt on the target cpu.
So, added a clockevents_get_next_event() helper function to return the
next_event on the target cpu's clock_event_device.
[ tglx: cleanups and simplifications ]
Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 7f1dd56af863..9fe3774a0fd3 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -4244,6 +4244,11 @@ static struct { | |||
4244 | .load_balancer = ATOMIC_INIT(-1), | 4244 | .load_balancer = ATOMIC_INIT(-1), |
4245 | }; | 4245 | }; |
4246 | 4246 | ||
4247 | int get_nohz_load_balancer(void) | ||
4248 | { | ||
4249 | return atomic_read(&nohz.load_balancer); | ||
4250 | } | ||
4251 | |||
4247 | /* | 4252 | /* |
4248 | * This routine will try to nominate the ilb (idle load balancing) | 4253 | * This routine will try to nominate the ilb (idle load balancing) |
4249 | * owner among the cpus whose ticks are stopped. ilb owner will do the idle | 4254 | * owner among the cpus whose ticks are stopped. ilb owner will do the idle |