[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 00/19] GICv4 Support for Xen


  • To: Julien Grall <julien@xxxxxxx>
  • From: Mykola Kvach <xakep.amatop@xxxxxxxxx>
  • Date: Fri, 13 Feb 2026 14:18:44 +0200
  • Arc-authentication-results: i=1; mx.google.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=yYAgGUGffvuHYd1ZunqHIlOmyUxXC7/dJt6Is9t6NNQ=; fh=jCddITIRBmVhai5fsel8Hn/4t4/GveTnXQ0OfLrOUBw=; b=QWu2vqQ+1xTO+83EeDDoOfZdJ3eqwCW8dptnmqVdNolMc+Rqxpb8oJY11xnXIhvPY8 ODYu9UgsDPl9gbLNOKqt6mr+AcSg2nEQBMQGcwch3KgATn/EiTQ3R3iO7ESUTstIBL3p dYI2kSeRJp3upCXFGc0pUeimwit4EfSdX6fF2nMq4su6axYsl1LUMNdNJ+tLSGvEOQyp 3Btlx9Uqm2Hw9XwFVeuNONsS0lLMuVza9YVv460YhcNhKzM6KI9RCPllVaYpWXWSjzjf og3qGGU7KfFjy9q1Kzza73R8TUsgLqVTWTfy98oUq5CE2c2u2E+m1zc1ogW8Bbced+dP uacw==; darn=lists.xenproject.org
  • Arc-seal: i=1; a=rsa-sha256; t=1770985135; cv=none; d=google.com; s=arc-20240605; b=fPGYO7rboRupc8ExDxL/61hJGvdwGslUrTBUyjtqdbn+50LItbMEwZSSvC4mLKo6nX CRZh5y2zthpCoHEbWe5oRthW0rZVDbZz2jqGcCzKD4f/3x7uUgENeA7Vf0FvBVz+G60S PTqWWVsr6ItU3pbfA1Xtr6agTtOW6en1/S6zb8n/GMEHaYadXqg2NXzaBKhDbvApfnCL xeBGMZASNdZA/EZq6KxF4SH2lIt9kV1gAneVTh3ELkpowXHfFXjapH/VnoIZA/meSNV2 DMa9TVTr8ldv0WBUdSs247Jh1NWNlEVtkMtbajE/AThJHX+41+lkikIcoEC0/r0uafFD 4RNg==
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 13 Feb 2026 12:19:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Julien,

On Fri, Feb 13, 2026 at 1:48 PM Julien Grall <julien@xxxxxxx> wrote:
>
> Hi Mykola,
>
> On 13/02/2026 11:36, Mykola Kvach wrote:
> > For this reason it may be worth conditionally recommending (or even
> > auto-selecting) `vwfi=native` when direct injection is enabled for a
> > vCPU, so measurements reflect the actual delivery fast-path rather than
> > exit/scheduling overhead.
>
> I don't think this is a straightforward answer. "vwfi=native" is
> beneficial when you have a single vCPU scheduled per pCPU. But if you
> have multiple vCPUs running, then you may impair the overall performance
> of the system as the scheduler will not be able to run another vCPU even
> if the current vCPU is doing nothing (it is waiting for an interrupt).
>
> As a data point, Xen didn't initially trapped WFI/WFE. But we noticed a
> lot of slow down during boot if all the vCPUs for a guest were running
> on the same pCPU. The difference was quite noticeable.
>
> So instead of recommending to always set "vwfi=native", I would consider
> an approach where Xen decides whether WFI/WFE is trapped based on the
> number of vCPUs that can be scheduled on a given pCPU. This could be
> adjusted on demand.

Thanks for the clarification. I agree: recommending vwfi=native
unconditionally is not correct.

What I meant was specifically for benchmarking direct injection in a
1:1 vCPU:pCPU setup (or with vCPUs pinned), where trapping WFI/WFE adds
extra exits and can hide the fast-path benefit.

For general setups with oversubscription, vwfi=trap is the right
default, because it lets Xen schedule another runnable vCPU instead of
leaving a pCPU effectively idle while the guest sits in WFI.

I like your suggestion: make WFI/WFE trapping adaptive based on whether
the current pCPU has other runnable vCPUs.


Best regards,
Mykola



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.