Re: [patch V6 07/11] rseq: Implement time slice extension enforcement timer

From: Thomas Gleixner

Date: Sun Jan 18 2026 - 05:46:22 EST


On Fri, Jan 16 2026 at 19:15, Peter Zijlstra wrote:
> On Fri, Dec 19, 2025 at 11:05:17AM +0100, Peter Zijlstra wrote:
>
>> I was thinking that perhaps the hrtimer tracepoints, filtered on this
>> specific timer, might just do. Arming the timer is the point where the
>> extension is granted, cancelling the timer is on the slice_yield() (or
>> any other random syscall :/), and the timer actually firing is on fail.
>
> Here, I google pasted this together. I don't actually speak much snake
> (as you well know). Nor does it fully work; the handle_expire() thing is
> busted, I definitely have expire entries in the trace, but they're not
> showing up.

You want the below. Then you get:

Task: slice_test Mean: 350.266 ns
Latency (us) | Count
------------------------------
EXPIRED | 238
0 us | 143189
1 us | 167
2 us | 26
3 us | 11
4 us | 28
5 us | 31
6 us | 22
7 us | 23
8 us | 32
9 us | 16
10 us | 35

Thanks

tglx
---
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1742,7 +1742,7 @@ static void __run_hrtimer(struct hrtimer

lockdep_assert_held(&cpu_base->lock);

- debug_deactivate(timer);
+ debug_hrtimer_deactivate(timer);
base->running = timer;

/*