]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/sched/core.c
sched/numa: Use a system-wide search to find swap/migration candidates
[karo-tx-linux.git] / kernel / sched / core.c
index 32a2b29c261088e576b48a14e4c63064d7e9ee0b..1fe59da280e31501cb141a9eae2febee43f4e2a8 100644 (file)
@@ -5236,6 +5236,7 @@ static void destroy_sched_domains(struct sched_domain *sd, int cpu)
 DEFINE_PER_CPU(struct sched_domain *, sd_llc);
 DEFINE_PER_CPU(int, sd_llc_size);
 DEFINE_PER_CPU(int, sd_llc_id);
+DEFINE_PER_CPU(struct sched_domain *, sd_numa);
 
 static void update_top_cache_domain(int cpu)
 {
@@ -5252,6 +5253,9 @@ static void update_top_cache_domain(int cpu)
        rcu_assign_pointer(per_cpu(sd_llc, cpu), sd);
        per_cpu(sd_llc_size, cpu) = size;
        per_cpu(sd_llc_id, cpu) = id;
+
+       sd = lowest_flag_domain(cpu, SD_NUMA);
+       rcu_assign_pointer(per_cpu(sd_numa, cpu), sd);
 }
 
 /*