Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21237dd1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: rq_stats: update related_cpus in the cpu_load runtime"

parents 57d6a25d 509cb3b7
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -190,6 +190,18 @@ static int cpufreq_transition_handler(struct notifier_block *nb,
	return 0;
}

static void update_related_cpus(void)
{
	unsigned cpu;

	for_each_cpu(cpu, cpu_online_mask) {
		struct cpu_load_data *this_cpu = &per_cpu(cpuload, cpu);
		struct cpufreq_policy cpu_policy;

		cpufreq_get_policy(&cpu_policy, cpu);
		cpumask_copy(this_cpu->related_cpus, cpu_policy.cpus);
	}
}
static int cpu_hotplug_handler(struct notifier_block *nb,
			unsigned long val, void *data)
{
@@ -200,6 +212,7 @@ static int cpu_hotplug_handler(struct notifier_block *nb,
	case CPU_ONLINE:
		if (!this_cpu->cur_freq)
			this_cpu->cur_freq = acpuclk_get_rate(cpu);
		update_related_cpus();
	case CPU_ONLINE_FROZEN:
		this_cpu->avg_load_maxfreq = 0;
	}