|
@@ -57,7 +57,7 @@
|
|
#include <linux/backing-dev.h>
|
|
#include <linux/backing-dev.h>
|
|
#include <linux/sort.h>
|
|
#include <linux/sort.h>
|
|
#include <linux/oom.h>
|
|
#include <linux/oom.h>
|
|
-
|
|
|
|
|
|
+#include <linux/sched/isolation.h>
|
|
#include <linux/uaccess.h>
|
|
#include <linux/uaccess.h>
|
|
#include <linux/atomic.h>
|
|
#include <linux/atomic.h>
|
|
#include <linux/mutex.h>
|
|
#include <linux/mutex.h>
|
|
@@ -656,7 +656,6 @@ static int generate_sched_domains(cpumask_var_t **domains,
|
|
int csn; /* how many cpuset ptrs in csa so far */
|
|
int csn; /* how many cpuset ptrs in csa so far */
|
|
int i, j, k; /* indices for partition finding loops */
|
|
int i, j, k; /* indices for partition finding loops */
|
|
cpumask_var_t *doms; /* resulting partition; i.e. sched domains */
|
|
cpumask_var_t *doms; /* resulting partition; i.e. sched domains */
|
|
- cpumask_var_t non_isolated_cpus; /* load balanced CPUs */
|
|
|
|
struct sched_domain_attr *dattr; /* attributes for custom domains */
|
|
struct sched_domain_attr *dattr; /* attributes for custom domains */
|
|
int ndoms = 0; /* number of sched domains in result */
|
|
int ndoms = 0; /* number of sched domains in result */
|
|
int nslot; /* next empty doms[] struct cpumask slot */
|
|
int nslot; /* next empty doms[] struct cpumask slot */
|
|
@@ -666,10 +665,6 @@ static int generate_sched_domains(cpumask_var_t **domains,
|
|
dattr = NULL;
|
|
dattr = NULL;
|
|
csa = NULL;
|
|
csa = NULL;
|
|
|
|
|
|
- if (!alloc_cpumask_var(&non_isolated_cpus, GFP_KERNEL))
|
|
|
|
- goto done;
|
|
|
|
- cpumask_andnot(non_isolated_cpus, cpu_possible_mask, cpu_isolated_map);
|
|
|
|
-
|
|
|
|
/* Special case for the 99% of systems with one, full, sched domain */
|
|
/* Special case for the 99% of systems with one, full, sched domain */
|
|
if (is_sched_load_balance(&top_cpuset)) {
|
|
if (is_sched_load_balance(&top_cpuset)) {
|
|
ndoms = 1;
|
|
ndoms = 1;
|
|
@@ -683,7 +678,7 @@ static int generate_sched_domains(cpumask_var_t **domains,
|
|
update_domain_attr_tree(dattr, &top_cpuset);
|
|
update_domain_attr_tree(dattr, &top_cpuset);
|
|
}
|
|
}
|
|
cpumask_and(doms[0], top_cpuset.effective_cpus,
|
|
cpumask_and(doms[0], top_cpuset.effective_cpus,
|
|
- non_isolated_cpus);
|
|
|
|
|
|
+ housekeeping_cpumask(HK_FLAG_DOMAIN));
|
|
|
|
|
|
goto done;
|
|
goto done;
|
|
}
|
|
}
|
|
@@ -707,7 +702,8 @@ static int generate_sched_domains(cpumask_var_t **domains,
|
|
*/
|
|
*/
|
|
if (!cpumask_empty(cp->cpus_allowed) &&
|
|
if (!cpumask_empty(cp->cpus_allowed) &&
|
|
!(is_sched_load_balance(cp) &&
|
|
!(is_sched_load_balance(cp) &&
|
|
- cpumask_intersects(cp->cpus_allowed, non_isolated_cpus)))
|
|
|
|
|
|
+ cpumask_intersects(cp->cpus_allowed,
|
|
|
|
+ housekeeping_cpumask(HK_FLAG_DOMAIN))))
|
|
continue;
|
|
continue;
|
|
|
|
|
|
if (is_sched_load_balance(cp))
|
|
if (is_sched_load_balance(cp))
|
|
@@ -789,7 +785,7 @@ restart:
|
|
|
|
|
|
if (apn == b->pn) {
|
|
if (apn == b->pn) {
|
|
cpumask_or(dp, dp, b->effective_cpus);
|
|
cpumask_or(dp, dp, b->effective_cpus);
|
|
- cpumask_and(dp, dp, non_isolated_cpus);
|
|
|
|
|
|
+ cpumask_and(dp, dp, housekeeping_cpumask(HK_FLAG_DOMAIN));
|
|
if (dattr)
|
|
if (dattr)
|
|
update_domain_attr_tree(dattr + nslot, b);
|
|
update_domain_attr_tree(dattr + nslot, b);
|
|
|
|
|
|
@@ -802,7 +798,6 @@ restart:
|
|
BUG_ON(nslot != ndoms);
|
|
BUG_ON(nslot != ndoms);
|
|
|
|
|
|
done:
|
|
done:
|
|
- free_cpumask_var(non_isolated_cpus);
|
|
|
|
kfree(csa);
|
|
kfree(csa);
|
|
|
|
|
|
/*
|
|
/*
|