diff options
author | Elliot Berman <quic_eberman@quicinc.com> | 2023-11-20 09:36:32 -0800 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2023-11-29 15:43:53 +0100 |
commit | 418146e39891ef1fb2284dee4cabbfe616cd21cf (patch) | |
tree | f712c7afd6a965d977e501f145e26d20242ea228 /kernel/freezer.c | |
parent | 5068d84054b766efe7c6202fc71b2350d1c326f1 (diff) |
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@quicinc.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20231120-freezer-state-multiple-thaws-v1-2-f2e1dd7ce5a2@quicinc.com
Diffstat (limited to 'kernel/freezer.c')
-rw-r--r-- | kernel/freezer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/freezer.c b/kernel/freezer.c index c450fa8b8b5e..43b1d1b94d9e 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; } |