|
@@ -315,6 +315,7 @@ void register_sched_domain_sysctl(void)
|
|
|
{
|
|
{
|
|
|
static struct ctl_table *cpu_entries;
|
|
static struct ctl_table *cpu_entries;
|
|
|
static struct ctl_table **cpu_idx;
|
|
static struct ctl_table **cpu_idx;
|
|
|
|
|
+ static bool init_done = false;
|
|
|
char buf[32];
|
|
char buf[32];
|
|
|
int i;
|
|
int i;
|
|
|
|
|
|
|
@@ -344,7 +345,10 @@ void register_sched_domain_sysctl(void)
|
|
|
if (!cpumask_available(sd_sysctl_cpus)) {
|
|
if (!cpumask_available(sd_sysctl_cpus)) {
|
|
|
if (!alloc_cpumask_var(&sd_sysctl_cpus, GFP_KERNEL))
|
|
if (!alloc_cpumask_var(&sd_sysctl_cpus, GFP_KERNEL))
|
|
|
return;
|
|
return;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ if (!init_done) {
|
|
|
|
|
+ init_done = true;
|
|
|
/* init to possible to not have holes in @cpu_entries */
|
|
/* init to possible to not have holes in @cpu_entries */
|
|
|
cpumask_copy(sd_sysctl_cpus, cpu_possible_mask);
|
|
cpumask_copy(sd_sysctl_cpus, cpu_possible_mask);
|
|
|
}
|
|
}
|