Re: [PATCH v2] cpufreq: Don't destroy/realloc policy/sysfs on hotplug/suspend
From: Saravana Kannan
Date: Tue Jul 15 2014 - 01:37:19 EST
On 07/14/2014 09:35 PM, Viresh Kumar wrote:
On 15 July 2014 00:38, Saravana Kannan <skannan@xxxxxxxxxxxxxx> wrote:
Yeah, it definitely crashes if policy->cpu if an offline cpu. Because the
mutex would be uninitialized if it's stopped after boot or it would never
have been initialized (depending on how you fix policy->cpu at boot).
Look at this snippet on the actual tree and it should be pretty evident.
Yeah, I missed it. So the problem is we initialize timer_mutex's for
policy->cpus. So we need to do that just for policy->cpu and also we don't
need a per-cpu timer_mutex anymore.
Btw, I tried to take a stab at removing any assumption in cpufreq code
about policy->cpu being ONLINE. There are 160 instances of those of with
23 are in cpufreq.c
So, even if we are sure cpufreq.c is fine, it's 137 other uses spread
across all the other files. I definitely don't want to try and fix those
as part of this patch. Way too risky and hard to get the test coverage
it would need. Even some of the acpi cpufreq drivers seem to be making
Btw, I think v3 is done. I did some testing and it was fine. But made
some minor changes. Will test tomorrow to make sure I didn't break
anything with the minor changes and then send them out.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/