summaryrefslogtreecommitdiffstats
path: root/tools/mm
diff options
context:
space:
mode:
authorKarl Mehltretter <kmehltretter@gmail.com>2026-09-19 16:40:27 +0200
committerThomas Gleixner <tglx@kernel.org>2026-09-29 23:42:11 +0200
commit28fa9af353bed2bb738c46e31f9b7d0347b759d1 (patch)
tree095de971566614869b3b9ff0061d66ce280da1fc /tools/mm
parent72d3fcf802c45d00b300f25b848a93c3a2bd7c7e (diff)
downloadlinux-stable-28fa9af353bed2bb738c46e31f9b7d0347b759d1.tar.gz
linux-stable-28fa9af353bed2bb738c46e31f9b7d0347b759d1.zip
hrtimer: Use the mask to clear TIF_HRTIMER_REARM from the exit work
hrtimer_rearm_deferred_user_irq() removes the rearm bit from the local copy of the TIF work with: *tif_work &= ~TIF_HRTIMER_REARM; TIF_HRTIMER_REARM is the bit number (12), not the mask. That clears TIF_NOTIFY_SIGNAL (bit 2) and TIF_MEMDIE (bit 3) from the copy and leaves bit 12 set. So the function never returns true, and the copy handed to exit_to_user_mode_loop() lacks TIF_NOTIFY_SIGNAL. If that was the only work for the loop, the task returns to user space with the task work still pending. hrtimer_interrupt() sets TIF_HRTIMER_REARM every time, so the next tick repeats that. Task work queued with TWA_SIGNAL from a hrtimer callback stays pending until the task does a syscall, takes an interrupt without deferred rearm or has to reschedule. A task which polls the io_uring completion ring in user space sees a timeout completion after 30ms (median) instead of 70us. 2 CPU QEMU guest, HZ=1000. Use the mask. Fixes: 15dd3a948855 ("hrtimer: Push reprogramming timers into the interrupt return path") Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Assisted-by: LLM Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260919144027.70250-1-kmehltretter@gmail.com
Diffstat (limited to 'tools/mm')
0 files changed, 0 insertions, 0 deletions