Skip to content

cpufreq: governors: Solve the ABBA lockups

Viresh Kumar linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 39 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5cpufreq: governor: Kill declare_show_sampling_rate_min()drivers/cpufreq/cpufreq_conservative.c drivers/cpufreq/cpufreq_governor.c drivers/cpufreq/cpufreq_governor.h +1 more+37 -452 replies
2/5cpufreq: governor: Create separate sysfs-opsdrivers/cpufreq/cpufreq_conservative.c drivers/cpufreq/cpufreq_governor.c drivers/cpufreq/cpufreq_governor.h +1 more+122 -10123 replies
3/5cpufreq: governor: Remove unused sysfs attribute macrosdrivers/cpufreq/cpufreq_governor.h+0 -681 reply
4/5cpufreq: Don't drop rwsem before calling CPUFREQ_GOV_POLICY_EXITdrivers/cpufreq/cpufreq.c include/linux/cpufreq.h+0 -94 replies
5/5cpufreq: Get rid of ->governor_enabled and its lockdrivers/cpufreq/cpufreq.c include/linux/cpufreq.h+0 -255 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] cpufreq: governors: Solve the ABBA lockups

Hi Rafael,

Sorry for doing this, I know you were also looking to fix this in a possibly different way. But I thought, it would be better if we fix that. We can scrap this version and take yours if that looks better.

The root cause of all the issues we were facing, was that we were taking policy->rwsem while accessing governor sysfs attributes. And that happened because we were sharing the show/store calls present in cpufreq.c.

I thought, perhaps the best way to fix it is to give separate sysfs-ops to governors. And that's what I did.

@Juri: I need your help in testing these. My platform doesn't give me those lockups (even without these patches) and Juno/Tc2 would fit better.

Can you please run some tests on these?

They are pushed here for easy access (and auto test by build-bot):
git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git cpufreq/governor-kobject

--
viresh

Viresh Kumar (5):
cpufreq: governor: Kill declare_show_sampling_rate_min()
cpufreq: governor: Create separate sysfs-ops
cpufreq: governor: Remove unused sysfs attribute macros
cpufreq: Don't drop rwsem before calling CPUFREQ_GOV_POLICY_EXIT
cpufreq: Get rid of ->governor_enabled and its lock

 drivers/cpufreq/cpufreq.c              |  29 ----------
 drivers/cpufreq/cpufreq_conservative.c |  77 ++++++++++---------------
 drivers/cpufreq/cpufreq_governor.c     |  86 ++++++++++++++++++++--------
 drivers/cpufreq/cpufreq_governor.h     | 101 +++++++--------------------------
 drivers/cpufreq/cpufreq_ondemand.c     |  77 ++++++++++---------------
 include/linux/cpufreq.h                |   5 --
 6 files changed, 143 insertions(+), 232 deletions(-)
Signature · 1 line
2.7.0.79.gdc08a19