diff options
| author | Heiko Carstens <hca@linux.ibm.com> | 2026-02-18 15:20:07 +0100 |
|---|---|---|
| committer | Vasily Gorbik <gor@linux.ibm.com> | 2026-02-25 16:46:07 +0100 |
| commit | 00d8b035eb71262abb547d47717b19f4a55ad4f2 (patch) | |
| tree | ba9680c35c31e76d80be2011ddad21322dc87716 /kernel | |
| parent | aefa6ec890f0d39a89fc80e95908ec1996337eee (diff) | |
s390/idle: Slightly optimize idle time accounting
Slightly optimize account_idle_time_irq() and update_timer_idle():
- Use fast single instruction __atomic64() primitives to update per
cpu idle_time and idle_count, instead of READ_ONCE() / WRITE_ONCE()
pairs
- stcctm() is an inline assembly with a full memory barrier. This
leads to a not necessary extra dereference of smp_cpu_mtid in
update_timer_idle(). Avoid this and read smp_cpu_mtid into a
variable
- Use __this_cpu_add() instead of this_cpu_add() to avoid disabling /
enabling of preemption several times in a loop in update_timer_idle().
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
