All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] cpufreq: cppc: Fix suspend/resume specific races with FIE code
@ 2021-06-10  8:23 ` Viresh Kumar
  0 siblings, 0 replies; 18+ messages in thread
From: Viresh Kumar @ 2021-06-10  8:23 UTC (permalink / raw)
  To: Rafael Wysocki, Qian Cai, Benjamin Herrenschmidt,
	Jonathan Corbet, Len Brown, Michael Ellerman, Paul Mackerras,
	Srinivas Pandruvada, Viresh Kumar
  Cc: linux-pm, Vincent Guittot, Ionela Voinescu, Dirk Brandewie,
	linux-doc, linux-kernel, linuxppc-dev

Hi Qian,

It would be helpful if you can test this patchset and confirm if the races you
mentioned went away or not and that the FIE code works as we wanted it to.

I don't have a real setup and so it won't be easy for me to test this out.

I have already sent a temporary fix for 5.13 and this patchset is targeted for
5.14 and is based over that.

-------------------------8<-------------------------

The CPPC driver currently stops the frequency invariance related
kthread_work and irq_work from cppc_freq_invariance_exit() which is only
called during driver's removal.

This is not sufficient as the CPUs can get hot-plugged out while the
driver is in use, the same also happens during system suspend/resume.

In such a cases we can reach a state where the CPU is removed by the
kernel but its kthread_work or irq_work aren't stopped.

Fix this by implementing the start_cpu() and stop_cpu() callbacks in the
cpufreq core, which will be called for each CPU's addition/removal.

A similar call was already available in the cpufreq core, which isn't required
anymore and so its users are migrated to use exit() callback instead.

This is targeted for v5.14-rc1.

--
Viresh

Viresh Kumar (5):
  cpufreq: cppc: Migrate to ->exit() callback instead of ->stop_cpu()
  cpufreq: intel_pstate: Migrate to ->exit() callback instead of
    ->stop_cpu()
  cpufreq: powerenv: Migrate to ->exit() callback instead of
    ->stop_cpu()
  cpufreq: Add start_cpu() and stop_cpu() callbacks
  cpufreq: cppc: Fix suspend/resume specific races with the FIE code

 Documentation/cpu-freq/cpu-drivers.rst |   7 +-
 drivers/cpufreq/Kconfig.arm            |   1 -
 drivers/cpufreq/cppc_cpufreq.c         | 163 ++++++++++++++-----------
 drivers/cpufreq/cpufreq.c              |  11 +-
 drivers/cpufreq/intel_pstate.c         |   9 +-
 drivers/cpufreq/powernv-cpufreq.c      |  23 ++--
 include/linux/cpufreq.h                |   5 +-
 7 files changed, 119 insertions(+), 100 deletions(-)

-- 
2.31.1.272.g89b43f80a514


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-06-16  4:57 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10  8:23 [PATCH 0/5] cpufreq: cppc: Fix suspend/resume specific races with FIE code Viresh Kumar
2021-06-10  8:23 ` Viresh Kumar
2021-06-10  8:23 ` [PATCH 1/5] cpufreq: cppc: Migrate to ->exit() callback instead of ->stop_cpu() Viresh Kumar
2021-06-10  8:23 ` [PATCH 2/5] cpufreq: intel_pstate: " Viresh Kumar
2021-06-10  8:23 ` [PATCH 3/5] cpufreq: powerenv: " Viresh Kumar
2021-06-10  8:23   ` Viresh Kumar
2021-06-10  8:24 ` [PATCH 4/5] cpufreq: Add start_cpu() and stop_cpu() callbacks Viresh Kumar
2021-06-10  8:24 ` [PATCH 5/5] cpufreq: cppc: Fix suspend/resume specific races with the FIE code Viresh Kumar
2021-06-14 13:48 ` [PATCH 0/5] cpufreq: cppc: Fix suspend/resume specific races with " Qian Cai
2021-06-14 13:48   ` Qian Cai
2021-06-15  7:50   ` Viresh Kumar
2021-06-15  7:50     ` Viresh Kumar
2021-06-15  9:38     ` Viresh Kumar
2021-06-15  9:38       ` Viresh Kumar
2021-06-15 12:17     ` Qian Cai
2021-06-15 12:17       ` Qian Cai
2021-06-16  4:57       ` Viresh Kumar
2021-06-16  4:57         ` Viresh Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.