summaryrefslogtreecommitdiff
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2009-02-03 15:19:23 (GMT)
committerSteve French <sfrench@us.ibm.com>2009-02-03 15:19:23 (GMT)
commite1f81c8a417be466e85a38b61679aa6860ec7331 (patch)
tree749815f74bfad330e83560a10fd5da5fc4d8c765 /kernel/cpuset.c
parent0e2bedaa394f74fa9f75ee937488c33d90039b5a (diff)
parentb1792e367053968f2ddb48bc911d314143ce6242 (diff)
downloadlinux-fsl-qoriq-e1f81c8a417be466e85a38b61679aa6860ec7331.tar.xz
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index a856788..f76db9d 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -61,6 +61,14 @@
#include <linux/cgroup.h>
/*
+ * Workqueue for cpuset related tasks.
+ *
+ * Using kevent workqueue may cause deadlock when memory_migrate
+ * is set. So we create a separate workqueue thread for cpuset.
+ */
+static struct workqueue_struct *cpuset_wq;
+
+/*
* Tracks how many cpusets are currently defined in system.
* When there is only one cpuset (the root cpuset) we can
* short circuit some hooks.
@@ -831,7 +839,7 @@ static DECLARE_WORK(rebuild_sched_domains_work, do_rebuild_sched_domains);
*/
static void async_rebuild_sched_domains(void)
{
- schedule_work(&rebuild_sched_domains_work);
+ queue_work(cpuset_wq, &rebuild_sched_domains_work);
}
/*
@@ -2111,6 +2119,9 @@ void __init cpuset_init_smp(void)
hotcpu_notifier(cpuset_track_online_cpus, 0);
hotplug_memory_notifier(cpuset_track_online_nodes, 10);
+
+ cpuset_wq = create_singlethread_workqueue("cpuset");
+ BUG_ON(!cpuset_wq);
}
/**