Commit 659053d
sched/fair: Add READ_ONCE() and use existing helper function to access ->avg_irq
mainline inclusion
from mainline-v6.9-rc1
category: other
Use existing helper function cpu_util_irq() instead of open-coding
access to ->avg_irq.
During review it was noted that ->avg_irq could be updated by a
different CPU than the one which is trying to access it.
->avg_irq is updated with WRITE_ONCE(), use READ_ONCE to access it
in order to avoid any compiler optimizations.
Signed-off-by: Shrikanth Hegde <sshegde@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20240101154624.100981-3-sshegde@linux.vnet.ibm.com
(cherry picked from commit a6965b3)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>1 parent 4df6043 commit 659053d
2 files changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9509 | 9509 | | |
9510 | 9510 | | |
9511 | 9511 | | |
9512 | | - | |
9513 | | - | |
| 9512 | + | |
9514 | 9513 | | |
9515 | | - | |
9516 | 9514 | | |
9517 | 9515 | | |
9518 | 9516 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3388 | 3388 | | |
3389 | 3389 | | |
3390 | 3390 | | |
3391 | | - | |
| 3391 | + | |
3392 | 3392 | | |
3393 | 3393 | | |
3394 | 3394 | | |
| |||
0 commit comments