|
@@ -5083,18 +5083,23 @@ static void destroy_sched_domains(struct sched_domain *sd, int cpu)
|
|
|
* two cpus are in the same cache domain, see cpus_share_cache().
|
|
|
*/
|
|
|
DEFINE_PER_CPU(struct sched_domain *, sd_llc);
|
|
|
+DEFINE_PER_CPU(int, sd_llc_size);
|
|
|
DEFINE_PER_CPU(int, sd_llc_id);
|
|
|
|
|
|
static void update_top_cache_domain(int cpu)
|
|
|
{
|
|
|
struct sched_domain *sd;
|
|
|
int id = cpu;
|
|
|
+ int size = 1;
|
|
|
|
|
|
sd = highest_flag_domain(cpu, SD_SHARE_PKG_RESOURCES);
|
|
|
- if (sd)
|
|
|
+ if (sd) {
|
|
|
id = cpumask_first(sched_domain_span(sd));
|
|
|
+ size = cpumask_weight(sched_domain_span(sd));
|
|
|
+ }
|
|
|
|
|
|
rcu_assign_pointer(per_cpu(sd_llc, cpu), sd);
|
|
|
+ per_cpu(sd_llc_size, cpu) = size;
|
|
|
per_cpu(sd_llc_id, cpu) = id;
|
|
|
}
|
|
|
|