[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 0/2] Xen real-time x86
On Mon, Jul 07, 2025 at 05:06:53PM -0700, Stefano Stabellini wrote: > Hi all, > > This short patch series improves Xen real-time execution on AMD x86 > processors. > > The key to real-time performance is deterministic guest execution times > and deterministic guest interrupt latency. In such configurations, the > null scheduler is typically used, and there should be no IPIs or other > sources of vCPU execution interruptions beyond the guest timer interrupt > as configured by the guest, and any passthrough interrupts for > passthrough devices. > > This is because, upon receiving a critical interrupt, the guest (such as > FreeRTOS or Zephyr) typically has a very short window of time to > complete the required action. Being interrupted in the middle of this > critical section could prevent the guest from completing the action > within the allotted time, leading to malfunctions. There's IMO still one pending issue after this series on x86, maybe you have addressed this with some local patch. Interrupt forwarding from Xen into HVM/PVH guests uses a softirq to do the injection, which means there's a non-deterministic window of latency between when the interrupt is received by Xen, as to when it's injected to the guest, because the softirq might not get processed right after being set as pending (there might be other softirqs to process, or simply Xen might be busy doing some other operation). I think you want to look into adding a new command line option or similar, that allows selecting whether guest IRQs are deferred to a softirq for injection, or are injected as part of the processing done in the IRQ handler itself. Otherwise there will always be a non-deterministic amount of latency on x86 w.r.t. HVM/PVH passthrough guest interrupts. Haven't you seen some weird/unexpected variance when doing this passthrough interrupt latency measurements on x86? Regards, Roger.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |