aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/sched.h
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2011-12-01 20:07:32 -0500
committerIngo Molnar <mingo@elte.hu>2011-12-06 03:06:30 -0500
commit1c792db7f7957e2e34b9a164f08200e36a25dfd0 (patch)
treed1ab8d9e860e12b31f8553309b79cc65ff380fa5 /kernel/sched/sched.h
parent5b680fd61388abb9059fbc8e7a2f60f602bfce15 (diff)
sched, nohz: Introduce nohz_flags in 'struct rq'
Introduce nohz_flags in the struct rq, which will track these two flags for now. NOHZ_TICK_STOPPED keeps track of the tick stopped status that gets set when the tick is stopped. It will be used to update the nohz idle load balancer data structures during the first busy tick after the tick is restarted. At this first busy tick after tickless idle, NOHZ_TICK_STOPPED flag will be reset. This will minimize the nohz idle load balancer status updates that currently happen for every tickless exit, making it more scalable when there are many logical cpu's that enter and exit idle often. NOHZ_BALANCE_KICK will track the need for nohz idle load balance on this rq. This will replace the nohz_balance_kick in the rq, which was not being updated atomically. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20111202010832.499438999@sbsiddha-desk.sc.intel.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r--kernel/sched/sched.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 8715055979d1..cf7d02662bc2 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -371,7 +371,7 @@ struct rq {
371 unsigned long last_load_update_tick; 371 unsigned long last_load_update_tick;
372#ifdef CONFIG_NO_HZ 372#ifdef CONFIG_NO_HZ
373 u64 nohz_stamp; 373 u64 nohz_stamp;
374 unsigned char nohz_balance_kick; 374 unsigned long nohz_flags;
375#endif 375#endif
376 int skip_clock_update; 376 int skip_clock_update;
377 377
@@ -1064,3 +1064,12 @@ extern void init_rt_rq(struct rt_rq *rt_rq, struct rq *rq);
1064extern void unthrottle_offline_cfs_rqs(struct rq *rq); 1064extern void unthrottle_offline_cfs_rqs(struct rq *rq);
1065 1065
1066extern void account_cfs_bandwidth_used(int enabled, int was_enabled); 1066extern void account_cfs_bandwidth_used(int enabled, int was_enabled);
1067
1068#ifdef CONFIG_NO_HZ
1069enum rq_nohz_flag_bits {
1070 NOHZ_TICK_STOPPED,
1071 NOHZ_BALANCE_KICK,
1072};
1073
1074#define nohz_flags(cpu) (&cpu_rq(cpu)->nohz_flags)
1075#endif