[PATCH 0/3] timer_migration: Fix a possible race and improvements
From: Anna-Maria Behnsen
Date: Fri Jun 21 2024 - 05:38:04 EST
Borislav reported a warning in timer migration deactive path
https://lore.kernel.org/r/20240612090347.GBZmlkc5PwlVpOG6vT@fat_crate.local
Sadly it doesn't reproduce directly. But with the change of timing (by
adding a trace prinkt before the warning), it is possible to trigger the
warning reliable at least in my test setup. The problem here is a racy
check agains group->parent pointer. This is also used in other places in
the code and fixing this racy usage is adressed by the first patch.
While working with the code, I saw two things which could be improved
(tracing and update of per cpu group wakeup value). This improvements are
adressed by the other two patches.
Patches are available here:
https://git.kernel.org/pub/scm/linux/kernel/git/anna-maria/linux-devel.git timers/misc
Cc: Frederic Weisbecker <frederic@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Thanks,
Anna-Maria
---
Anna-Maria Behnsen (3):
timer_migration: Do not rely always on group->parent
timer_migration: Spare write when nothing changed
timer_migration: Improve tracing
kernel/time/timer_migration.c | 55 ++++++++++++++++++++-----------------------
kernel/time/timer_migration.h | 12 +++++++++-
2 files changed, 36 insertions(+), 31 deletions(-)