diff options
| author | Thomas Gleixner <tglx@kernel.org> | 2026-02-24 17:38:52 +0100 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2026-02-27 16:40:16 +0100 |
| commit | 1339eeb73d6b99cf3aa9981f3f91d6ac4a49c72e (patch) | |
| tree | 38945fe51178034c816a5dbef137be54582d1032 /include/linux/timerqueue_types.h | |
| parent | 671047943dce5af24e023bca3c5cc244d7565f5a (diff) | |
timerqueue: Provide linked timerqueue
The hrtimer subsystem wants to peak ahead to the next and previous timer to
evaluated whether a to be rearmed timer can stay at the same position in
the RB tree with the new expiry time.
The linked RB tree provides the infrastructure for this as it maintains
links to the previous and next nodes for each entry in the tree.
Provide timerqueue wrappers around that.
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260224163431.734827095@kernel.org
Diffstat (limited to 'include/linux/timerqueue_types.h')
| -rw-r--r-- | include/linux/timerqueue_types.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/linux/timerqueue_types.h b/include/linux/timerqueue_types.h index dc298d0923e3..be2218b147c4 100644 --- a/include/linux/timerqueue_types.h +++ b/include/linux/timerqueue_types.h @@ -6,12 +6,21 @@ #include <linux/types.h> struct timerqueue_node { - struct rb_node node; - ktime_t expires; + struct rb_node node; + ktime_t expires; }; struct timerqueue_head { - struct rb_root_cached rb_root; + struct rb_root_cached rb_root; +}; + +struct timerqueue_linked_node { + struct rb_node_linked node; + ktime_t expires; +}; + +struct timerqueue_linked_head { + struct rb_root_linked rb_root; }; #endif /* _LINUX_TIMERQUEUE_TYPES_H */ |
