summaryrefslogtreecommitdiff
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-25 12:29:02 +0200
committerIngo Molnar <mingo@elte.hu>2008-06-25 12:29:02 +0200
commit37f5d732f34fa099676b2c52b8a57bab01a011de (patch)
treecca207ab2009e8d5d2097602133d1a20de2b2e5c /kernel/cpuset.c
parented9e4996d9a123b7550e63713d563f524fa9d9f0 (diff)
parent543cf4cb3fe6f6cae3651ba918b9c56200b257d0 (diff)
Merge branch 'linus' into tracing/sysproftip-tracing-sysprof-2008-06-25_10.29_Wed
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 039baa4cd90c..9fceb97e989c 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1037,8 +1037,8 @@ int current_cpuset_is_being_rebound(void)
static int update_relax_domain_level(struct cpuset *cs, s64 val)
{
- if ((int)val < 0)
- val = -1;
+ if (val < -1 || val >= SD_LV_MAX)
+ return -EINVAL;
if (val != cs->relax_domain_level) {
cs->relax_domain_level = val;
@@ -1890,6 +1890,12 @@ static void common_cpu_mem_hotplug_unplug(void)
top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY];
scan_for_empty_cpusets(&top_cpuset);
+ /*
+ * Scheduler destroys domains on hotplug events.
+ * Rebuild them based on the current settings.
+ */
+ rebuild_sched_domains();
+
cgroup_unlock();
}