All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH] x86/x2apic: introduce a mixed physical/cluster mode
Date: Mon, 30 Oct 2023 17:38:08 +0100	[thread overview]
Message-ID: <ZT_b8BZH4AVOM3JG@macbook> (raw)
In-Reply-To: <db4eac3c-3ecf-d376-0a22-6cdcf6616f73@suse.com>

On Mon, Oct 30, 2023 at 05:34:48PM +0100, Jan Beulich wrote:
> On 30.10.2023 17:10, Roger Pau Monné wrote:
> > On Mon, Oct 30, 2023 at 03:32:56PM +0100, Jan Beulich wrote:
> >> On 24.10.2023 15:51, Roger Pau Monne wrote:
> >>> The current implementation of x2APIC requires to either use Cluster Logical or
> >>> Physical mode for all interrupts.  However the selection of Physical vs Logical
> >>> is not done at APIC setup, an APIC can be addressed both in Physical or Logical
> >>> destination modes concurrently.
> >>>
> >>> Introduce a new x2APIC mode called mixed, which uses Logical Cluster mode for
> >>> IPIs, and Physical mode for external interrupts, thus attempting to use the
> >>> best method for each interrupt type.
> >>>
> >>> Using Physical mode for external interrupts allows more vectors to be used, and
> >>> interrupt balancing to be more accurate.
> >>>
> >>> Using Logical Cluster mode for IPIs allows less accesses to the ICR register
> >>> when sending those, as multiple CPUs can be targeted with a single ICR register
> >>> write.
> >>>
> >>> A simple test calling flush_tlb_all() 10000 times in a tight loop on a 96 CPU
> >>> box gives the following average figures:
> >>>
> >>> Physical mode: 26617931ns
> >>> Mixed mode:    23865337ns
> >>>
> >>> So ~10% improvement versus plain Physical mode.
> >>
> >> Nice.
> >>
> >>>  Note that Xen uses Cluster
> >>> mode by default, and hence is already using the fastest way for IPI delivery at
> >>> the cost of reducing the amount of vectors available system-wide.
> >>>
> >>> Make the newly introduced mode the default one.
> >>>
> >>> Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
> >>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> >>> ---
> >>> Do we want to keep a full Logical Cluster mode available?  I don't see a reason
> >>> to target external interrupts in Logical Cluster mode, but maybe there's
> >>> something I'm missing.
> >>>
> >>> It's not clear to me whether the ACPI FADT flags are meant to apply only to
> >>> external interrupt delivery mode, or also to IPI delivery.  If
> >>> ACPI_FADT_APIC_PHYSICAL is only meant to apply to external interrupts and not
> >>> IPIs then we could possibly get rid of physical mode IPI delivery.
> >>>
> >>> Still need to put this under XenServer extensive testing, but wanted to get
> >>> some feedback before in case approach greatly changes.
> >>
> >> Looks quite okay, just a couple of minor remarks:
> > 
> > Thanks.
> > 
> > Do we still want to keep the pure cluster mode?
> 
> I think we should keep it for a full release cycle or two.

OK, will make the requested changes and send v2 then.

Thanks, Roger.


  reply	other threads:[~2023-10-30 16:38 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24 13:51 [PATCH] x86/x2apic: introduce a mixed physical/cluster mode Roger Pau Monne
2023-10-30 14:32 ` Jan Beulich
2023-10-30 16:10   ` Roger Pau Monné
2023-10-30 16:34     ` Jan Beulich
2023-10-30 16:38       ` Roger Pau Monné [this message]
2023-10-30 14:50 ` Elliott Mitchell
2023-10-30 15:27   ` Roger Pau Monné
2023-11-01  1:05     ` Elliott Mitchell
2023-11-07 19:35     ` Elliott Mitchell
2023-11-17 10:12       ` Neowutran
2023-11-18  3:04         ` Elliott Mitchell
2023-11-18 11:33           ` Andrew Cooper
2023-11-22  0:56             ` Elliott Mitchell
2023-11-23  9:39               ` Roger Pau Monné
2023-11-25  1:15                 ` Elliott Mitchell
2023-11-27  8:27                   ` Roger Pau Monné
2023-12-04  1:02                     ` Elliott Mitchell
2023-12-04  8:03                       ` Jan Beulich
2023-12-04 11:07                       ` Roger Pau Monné
2023-11-24 19:54             ` Neowutran
2023-11-27 11:49               ` Andrew Cooper
2023-11-27 14:53                 ` Roger Pau Monné
2023-11-27 15:56                   ` Andrew Cooper
2023-11-27 15:18           ` Neowutran
2023-11-27 16:17             ` Andrew Cooper

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=ZT_b8BZH4AVOM3JG@macbook \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --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.