aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/cpuset.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 6eae6639e851..60d2c4702c6c 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -496,11 +496,16 @@ update_domain_attr(struct sched_domain_attr *dattr, struct cpuset *c)
496/* 496/*
497 * rebuild_sched_domains() 497 * rebuild_sched_domains()
498 * 498 *
499 * If the flag 'sched_load_balance' of any cpuset with non-empty 499 * This routine will be called to rebuild the scheduler's dynamic
500 * 'cpus' changes, or if the 'cpus' allowed changes in any cpuset 500 * sched domains:
501 * which has that flag enabled, or if any cpuset with a non-empty 501 * - if the flag 'sched_load_balance' of any cpuset with non-empty
502 * 'cpus' is removed, then call this routine to rebuild the 502 * 'cpus' changes,
503 * scheduler's dynamic sched domains. 503 * - or if the 'cpus' allowed changes in any cpuset which has that
504 * flag enabled,
505 * - or if the 'sched_relax_domain_level' of any cpuset which has
506 * that flag enabled and with non-empty 'cpus' changes,
507 * - or if any cpuset with non-empty 'cpus' is removed,
508 * - or if a cpu gets offlined.
504 * 509 *
505 * This routine builds a partial partition of the systems CPUs 510 * This routine builds a partial partition of the systems CPUs
506 * (the set of non-overlappping cpumask_t's in the array 'part' 511 * (the set of non-overlappping cpumask_t's in the array 'part'
@@ -1076,7 +1081,8 @@ static int update_relax_domain_level(struct cpuset *cs, s64 val)
1076 1081
1077 if (val != cs->relax_domain_level) { 1082 if (val != cs->relax_domain_level) {
1078 cs->relax_domain_level = val; 1083 cs->relax_domain_level = val;
1079 rebuild_sched_domains(); 1084 if (!cpus_empty(cs->cpus_allowed) && is_sched_load_balance(cs))
1085 rebuild_sched_domains();
1080 } 1086 }
1081 1087
1082 return 0; 1088 return 0;