On Tuesday, January 27, 2015 02:06:06 PM Viresh Kumar wrote:
Hi Rafael,
The aim of this series is to stop managing cpufreq sysfs directories on CPU hotplugs.
OK, and this is the last one I'm going to consider for 3.20 (in case you have more of them queued up somewhere).
This issue has been raised multiple times earlier, the latest being tried by Saravana. While working on the $Subject thread, I did lots of cleanups, most of which are already pushed by you.
The two remaining ones are added to this series..
Currently on removal of a 'cpu != policy->cpu', we remove its sysfs directories by removing the soft-link. And on removal of policy->cpu, we migrate the sysfs directories to the next cpu. But if policy->cpu was the last CPU, we remove the policy completely and allocate it again as soon as the CPUs come back. This has shortcomings:
- Code Complexity
- Slower hotplug
- sysfs file permissions are reset after all policy->cpus are offlined
- CPUFreq stats history lost after all policy->cpus are offlined
- Special management of sysfs stuff during suspend/resume
To make things simple we stop playing with sysfs files unless the driver is getting removed.
And uses will see CPUs that are not present any more?