Re: [patch 19/48] clockevents: Provide support for clocksource coupled comparators

From: Peter Zijlstra

Date: Tue Mar 24 2026 - 13:40:01 EST


On Tue, Mar 24, 2026 at 06:24:16PM +0100, Thomas Gleixner wrote:
> On Tue, Mar 24 2026 at 03:37, Michael Kelley wrote:
> > This approach is not as general as Peter's, but it covers the Hyper-V timer
> > case, and is simpler. The cost is an extra memory reference in
> > arch_inlined_clockevent_set_next_coupled(). arch/x86/Kconfig can continue
>
> Which can be avoided with a runtime_const if the decision between hyperv
> timer and tscdeadline timer happens before either of them registered the
> clockevent and does not change later on.

If the wrmsr immediate form is faster (that was their purpose) than the
current form this will no longer work and we'll have to get more
creative, but yes, until that time this should work.