[patch] BFS 421-1: cleanup online_cpus
From: Hillf Danton
Date: Fri Jul 06 2012 - 08:28:24 EST
To remove cpu_online_map, lets clean up online_cpus.
SOB: Hillf Danton <dhillf@xxxxxxxxx>
---
--- a/kernel/sched/bfs.c Thu Jul 5 21:43:36 2012
+++ b/kernel/sched/bfs.c Fri Jul 6 20:09:08 2012
@@ -1365,24 +1365,6 @@ can_preempt(struct task_struct *p, int p
}
#ifdef CONFIG_SMP
-#ifdef CONFIG_HOTPLUG_CPU
-/*
- * Check to see if there is a task that is affined only to offline CPUs but
- * still wants runtime. This happens to kernel threads during suspend/halt and
- * disabling of CPUs.
- */
-static inline bool online_cpus(struct task_struct *p)
-{
- return (likely(cpus_intersects(cpu_online_map, p->cpus_allowed)));
-}
-#else /* CONFIG_HOTPLUG_CPU */
-/* All available CPUs are always online without hotplug. */
-static inline bool online_cpus(struct task_struct *p)
-{
- return true;
-}
-#endif
-
/*
* Check to see if p can run on cpu, and if not, whether there are any online
* CPUs it can run on instead.
@@ -5063,7 +5045,8 @@ static void break_sole_affinity(int src_
struct task_struct *p, *t;
do_each_thread(t, p) {
- if (p != idle && !online_cpus(p)) {
+ if (p != idle && !cpumask_intersects(tsk_cpus_allowed(p),
+ cpu_online_mask)) {
cpumask_copy(tsk_cpus_allowed(p), cpu_possible_mask);
/*
* Don't tell them about moving exiting tasks or
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/