Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH 0/2] freezer,sched: do not restore saved_state of a thawed task
@ 2023-11-20 17:36 Elliot Berman
  2023-11-20 17:36 ` [PATCH 1/2] " Elliot Berman
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Elliot Berman @ 2023-11-20 17:36 UTC (permalink / raw)
  To: Rafael J. Wysocki, Pavel Machek, Ingo Molnar,
	Peter Zijlstra (Intel)
  Cc: linux-arm-msm, Pavan Kondeti, Aiqun Yu (Maria), linux-pm,
	linux-kernel, Elliot Berman, Abhijeet Dharmapurikar

This series applies couple fixes to commit 8f0eed4a78a8 ("freezer,sched:
Use saved_state to reduce some spurious wakeups") which was found while
testing with legacy cgroup freezer. My original testing was only with
system-wide freezer. We found that thaw_task could be called on a task
which was already frozen. Prior to commit 8f0eed4a78a8 ("freezer,sched:
Use saved_state to reduce some spurious wakeups"), this wasn't an issue
as kernel would try to wake up TASK_FROZEN, which wouldn't match the
thawed task state, and no harm done to task. After commit 8f0eed4a78a8
("freezer,sched: Use saved_state to reduce some spurious wakeups"), it
was possible to overwrite the state of thawed task.

To: Rafael J. Wysocki <rafael@kernel.org>
To: Pavel Machek <pavel@ucw.cz>
To: Ingo Molnar <mingo@kernel.org>
To: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc:  <linux-arm-msm@vger.kernel.org>
Cc: Pavan Kondeti <quic_pkondeti@quicinc.com>
Cc: Aiqun Yu (Maria) <quic_aiquny@quicinc.com>
Cc:  <linux-pm@vger.kernel.org>
Cc:  <linux-kernel@vger.kernel.org>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>

Originally sent to only linux-arm-msm, resending to correct authors.
- Link to v1: https://lore.kernel.org/r/20231120-freezer-state-multiple-thaws-v1-0-a4c453f50745@quicinc.com

---
Elliot Berman (2):
      freezer,sched: do not restore saved_state of a thawed task
      freezer,sched: clean saved_state when restoring it during thaw

 kernel/freezer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
base-commit: 6d7e4782bcf549221b4ccfffec2cf4d1a473f1a3
change-id: 20231108-freezer-state-multiple-thaws-7a3a8d9dadb3

Best regards,
-- 
Elliot Berman <quic_eberman@quicinc.com>


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

end of thread, other threads:[~2023-11-28 17:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-20 17:36 [PATCH 0/2] freezer,sched: do not restore saved_state of a thawed task Elliot Berman
2023-11-20 17:36 ` [PATCH 1/2] " Elliot Berman
2023-11-20 17:36 ` [PATCH 2/2] freezer,sched: clean saved_state when restoring it during thaw Elliot Berman
2023-11-28  9:12 ` [PATCH 0/2] freezer,sched: do not restore saved_state of a thawed task Aiqun(Maria) Yu
2023-11-28 17:31   ` Peter Zijlstra
2023-11-28 17:33     ` Elliot Berman
2023-11-28 17:54       ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox