Commit 52b33d8
sched/psi: Use task->psi_flags to clear in CPU migration
The commit d583d36 ("psi: Fix psi state corruption when schedule()
races with cgroup move") fixed a race problem by making cgroup_move_task()
use task->psi_flags instead of looking at the scheduler state.
We can extend task->psi_flags usage to CPU migration, which should be
a minor optimization for performance and code simplicity.
Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Link: https://lore.kernel.org/r/20220926081931.45420-1-zhouchengming@bytedance.com1 parent 710ffe6 commit 52b33d8
3 files changed
Lines changed: 5 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
888 | 888 | | |
889 | 889 | | |
890 | 890 | | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | 891 | | |
895 | 892 | | |
896 | 893 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2053 | 2053 | | |
2054 | 2054 | | |
2055 | 2055 | | |
2056 | | - | |
| 2056 | + | |
2057 | 2057 | | |
2058 | 2058 | | |
2059 | 2059 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
136 | 134 | | |
137 | 135 | | |
138 | 136 | | |
| |||
143 | 141 | | |
144 | 142 | | |
145 | 143 | | |
146 | | - | |
147 | | - | |
148 | 144 | | |
149 | 145 | | |
150 | 146 | | |
| |||
157 | 153 | | |
158 | 154 | | |
159 | 155 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 156 | + | |
164 | 157 | | |
165 | 158 | | |
166 | 159 | | |
| |||
172 | 165 | | |
173 | 166 | | |
174 | 167 | | |
175 | | - | |
| 168 | + | |
176 | 169 | | |
177 | 170 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | 171 | | |
185 | 172 | | |
186 | | - | |
187 | | - | |
| 173 | + | |
188 | 174 | | |
189 | 175 | | |
190 | 176 | | |
| |||
0 commit comments