aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-29 17:46:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-29 17:46:05 -0400
commit7fda0412c5f7afdd1a5ff518f98dee5157266d8a (patch)
treed312af46758fa9b59431a479d258b54184a00591 /kernel/cpuset.c
parent6b8212a313dae341ef3a2e413dfec5c4dea59617 (diff)
parent160594e99dbbb0a5600ad922c630952c7c1c14bf (diff)
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Ingo Molnar. * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpusets: Remove an unused variable sched/rt: Improve pick_next_highest_task_rt() sched: Fix select_fallback_rq() vs cpu_active/cpu_online sched/x86/smp: Do not enable IRQs over calibrate_delay() sched: Fix compiler warning about declared inline after use MAINTAINERS: Update email address for SCHEDULER and PERF EVENTS
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 1010cc61931f..b96ad75b7e64 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -2162,10 +2162,9 @@ void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask)
2162 mutex_unlock(&callback_mutex); 2162 mutex_unlock(&callback_mutex);
2163} 2163}
2164 2164
2165int cpuset_cpus_allowed_fallback(struct task_struct *tsk) 2165void cpuset_cpus_allowed_fallback(struct task_struct *tsk)
2166{ 2166{
2167 const struct cpuset *cs; 2167 const struct cpuset *cs;
2168 int cpu;
2169 2168
2170 rcu_read_lock(); 2169 rcu_read_lock();
2171 cs = task_cs(tsk); 2170 cs = task_cs(tsk);
@@ -2186,22 +2185,10 @@ int cpuset_cpus_allowed_fallback(struct task_struct *tsk)
2186 * changes in tsk_cs()->cpus_allowed. Otherwise we can temporary 2185 * changes in tsk_cs()->cpus_allowed. Otherwise we can temporary
2187 * set any mask even if it is not right from task_cs() pov, 2186 * set any mask even if it is not right from task_cs() pov,
2188 * the pending set_cpus_allowed_ptr() will fix things. 2187 * the pending set_cpus_allowed_ptr() will fix things.
2188 *
2189 * select_fallback_rq() will fix things ups and set cpu_possible_mask
2190 * if required.
2189 */ 2191 */
2190
2191 cpu = cpumask_any_and(&tsk->cpus_allowed, cpu_active_mask);
2192 if (cpu >= nr_cpu_ids) {
2193 /*
2194 * Either tsk->cpus_allowed is wrong (see above) or it
2195 * is actually empty. The latter case is only possible
2196 * if we are racing with remove_tasks_in_empty_cpuset().
2197 * Like above we can temporary set any mask and rely on
2198 * set_cpus_allowed_ptr() as synchronization point.
2199 */
2200 do_set_cpus_allowed(tsk, cpu_possible_mask);
2201 cpu = cpumask_any(cpu_active_mask);
2202 }
2203
2204 return cpu;
2205} 2192}
2206 2193
2207void cpuset_init_current_mems_allowed(void) 2194void cpuset_init_current_mems_allowed(void)