All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Stefano Stabellini <stefano.stabellini@amd.com>
Cc: xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Xenia.Ragiadakou@amd.com, alejandro.garciavallejo@amd.com,
	Jason.Andryuk@amd.com
Subject: Re: [PATCH 0/2] Xen real-time x86
Date: Tue, 8 Jul 2025 12:11:44 +0200	[thread overview]
Message-ID: <aGzu4A_nk3dAScxt@macbook.local> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2507071657440.605088@ubuntu-linux-20-04-desktop>

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.


  parent reply	other threads:[~2025-07-08 10:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-08  0:06 [PATCH 0/2] Xen real-time x86 Stefano Stabellini
2025-07-08  0:07 ` [PATCH 1/2] xen/x86: don't send IPI to sync TSC when it is reliable Stefano Stabellini
2025-07-08  9:54   ` Alejandro Vallejo
2025-07-08 17:40     ` Stefano Stabellini
2025-07-08 17:53       ` Alejandro Vallejo
2025-07-08 13:24   ` Jan Beulich
2025-07-08 17:40     ` Stefano Stabellini
2025-07-09  7:04       ` Jan Beulich
2025-07-08  0:07 ` [PATCH 2/2] xen/x86: introduce AMD_MCE_NONFATAL Stefano Stabellini
2025-07-08  3:23   ` Demi Marie Obenour
2025-07-08 10:25   ` Alejandro Vallejo
2025-07-08 13:28     ` Jan Beulich
2025-07-08 17:13       ` Stefano Stabellini
2025-07-08 10:11 ` Roger Pau Monné [this message]
2025-07-08 13:31   ` [PATCH 0/2] Xen real-time x86 Jan Beulich
2025-07-08 17:11     ` Stefano Stabellini
2025-07-09  5:37       ` Jan Beulich
2025-07-10  0:44         ` Stefano Stabellini
2025-07-10  7:02           ` Roger Pau Monné
2025-07-10  8:02             ` Jan Beulich
2025-07-10 21:39               ` Stefano Stabellini
2025-07-11  1:23                 ` Demi Marie Obenour
2025-07-09 14:10       ` Roger Pau Monné

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aGzu4A_nk3dAScxt@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=Jason.Andryuk@amd.com \
    --cc=Xenia.Ragiadakou@amd.com \
    --cc=alejandro.garciavallejo@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=stefano.stabellini@amd.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.