[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 4 Apr 2014 14:05:35 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: tglx@...utronix.de, fweisbec@...il.com, peterz@...radead.org,
mingo@...nel.org, tj@...nel.org, lizefan@...wei.com
Cc: linaro-kernel@...ts.linaro.org, linaro-networking@...aro.org,
Arvind.Chauhan@....com, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, Viresh Kumar <viresh.kumar@...aro.org>
Subject: [PATCH V2 8/8] sched: don't queue timers on quiesced CPUs
CPUSets have cpusets.quiesce sysfs file now, with which some CPUs can opt for
isolating themselves from background kernel activities, like: timers & hrtimers.
get_nohz_timer_target() is used for finding suitable CPU for firing a timer. To
guarantee that new timers wouldn't be queued on quiesced CPUs, we need to modify
this routine.
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
kernel/sched/core.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index c0339e2..b235af2 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -557,17 +557,18 @@ void resched_cpu(int cpu)
*/
int get_nohz_timer_target(int pinned)
{
- int cpu = smp_processor_id();
- int i;
+ int cpu = smp_processor_id(), i;
struct sched_domain *sd;
- if (pinned || !get_sysctl_timer_migration() || !idle_cpu(cpu))
+ if (pinned || !get_sysctl_timer_migration() ||
+ !(idle_cpu(cpu) || cpu_quiesced(cpu)))
return cpu;
rcu_read_lock();
for_each_domain(cpu, sd) {
for_each_cpu(i, sched_domain_span(sd)) {
- if (!idle_cpu(i)) {
+ /* Don't push timers to quiesced CPUs */
+ if (!(cpu_quiesced(i) || idle_cpu(i))) {
cpu = i;
goto unlock;
}
--
1.7.12.rc2.18.g61b472e
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists