Re: [PATCH] KVM: x86/xen: bail in IRQ context on PREEMPT_RT in kvm_xen_set_evtchn_fast()

From: David Woodhouse

Date: Fri May 08 2026 - 13:49:54 EST


On Thu, 2026-05-07 at 13:02 -0300, Mauricio Faria de Oliveira wrote:
>
> Ok, thanks; I'll drop this. Could you please Cc me when you send it out?
>
> > Currently confused by the fact that the read_trylock() seems to fail
> > more often than it should under RT, causing the fallback path to be
> > taken... and the fallback path doesn't seem to work properly...
> >
> > Your version should have seen this too, surely? Did the selftest in
> > linux/tools/testing/selftests/kvm/x86/xen_shinfo_test work with your
> > patch?
>
> Yes, it works, apparently. Timing is similar with/without PREEMPT_RT.

Turns out my issue wasn't about the locking at all; hrtimer delivery
was broken by commit 15dd3a948855 and is fixed by
https://lore.kernel.org/all/20260423155611.216805954@xxxxxxxxxxxxx/

All that staring at the delivery fallback path did lead me to find an
issue with the latency of the slow path though.

Patch series incoming.

Attachment: smime.p7s
Description: S/MIME cryptographic signature