[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231120-freezer-state-multiple-thaws-v1-2-f2e1dd7ce5a2@quicinc.com>
Date: Mon, 20 Nov 2023 09:36:32 -0800
From: Elliot Berman <quic_eberman@...cinc.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
Pavel Machek <pavel@....cz>, "Ingo Molnar" <mingo@...nel.org>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>
CC: <linux-arm-msm@...r.kernel.org>,
Pavan Kondeti <quic_pkondeti@...cinc.com>,
"Aiqun Yu (Maria)" <quic_aiquny@...cinc.com>,
<linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Elliot Berman <quic_eberman@...cinc.com>
Subject: [PATCH 2/2] freezer,sched: clean saved_state when restoring it
during thaw
Clean saved_state after using it during thaw. Cleaning the saved_state
allows us to avoid some unnecessary branches in ttwu_state_match.
Signed-off-by: Elliot Berman <quic_eberman@...cinc.com>
---
kernel/freezer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/freezer.c b/kernel/freezer.c
index 759006a9a910..f57aaf96b829 100644
--- a/kernel/freezer.c
+++ b/kernel/freezer.c
@@ -187,6 +187,7 @@ static int __restore_freezer_state(struct task_struct *p, void *arg)
if (state != TASK_RUNNING) {
WRITE_ONCE(p->__state, state);
+ p->saved_state = TASK_RUNNING;
return 1;
}
--
2.41.0
Powered by blists - more mailing lists