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

Re: [PATCH 1/6] x86/Kconfig: add selection of default x2APIC destination mode


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 29 Jun 2022 10:47:01 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IhbvO5SwJfFs9bHqeDl4RP4KD4/w5e265OYnGZAESY8=; b=RMfNtvXwV6BCYBUSwOHfBpvBH7PW9bHQ3gldvwmNX3ahEhvxKGrZXhrGiQzq+Cp/NtJvpNSjsErygbs9hh4ky3ABHiMCoo/SICVvuzGyJ2RqxqGUlpMicz7M+E/C2tTvpoLSV06lQYN4FReGgMT28jPivZndhZJPCowo2XYkyAFM7sQYZemRFxKdUP6bs+JFhh9kKmYpl6WiBku6Q/QZ5opmDckS67tAu3w/uCFJQ9a9DxIQWXymbWJT0Il6k8h/XeUtBqWu3MB//VFhMc/bm4Xbq0pQSY3hVm70ctNZfdZEdElRoMbJVj5E/gbUUjxOuf3453F2gNw8EDxCp581gw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HuBBIvrrCWVHCIO0/SV0q159Q/hyZPbFOyzyZNcUZ4ch+LeeqcAusswtM3Sr0GX/7BcczsR69Z9DHIYltL1KLhjlCJrZ0dEZWrLl90utwQ37HI+586VIMUrfecf2vHnt/glMLppRYFEDdYtjfcyeeeUG2FSIaci7vFRF+9IzN5xLHMaIzb3QqPQfwuxUP3LQUJtTBcMH+TTL7ufSZqXUc+0a90WD/Y/ic9VtcZTKbJ0nG4ORZjX37dOQ9siUtxSpDG6Quzmn9wi3I67Cm4a0hDm++51DqrIFV+dwCTYYGjymeYbMxjsrhOcKdY8/SNtDFfO3SCVLDn7T2/w10tlepw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 29 Jun 2022 08:47:22 +0000
  • Ironport-data: A9a23:VtwDdqK3Om1ry0klFE+RpZQlxSXFcZb7ZxGr2PjKsXjdYENS0GADm GFMCD3VOPiCNmr9fo1/b4rk8RlUv8DcmIQwSAFlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0vrav67xZVF/fngqoDUUYYoAQgsA14+IMsdoUg7wbRh3NQ52YHR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 PcSs8SZdT0qBYrvnMtEQV5WPhNZA7ITrdcrIVDn2SCS52vvViK1ht9IXAQxN4Be/ftrC2ZT8 /BeMCoKch2Im+OxxvS8V/VogcMgasLsOevzuFk5lW2fUalgHMCFGvuajTNb9G5YasRmB/HRa tBfcTNyRB/BfwdOKhEcD5dWcOKA2SWiK2MB9Qn9Sawf33Xi1S5Wz5LUbtfoRvqtZNRZu1bIu TeTl4j+KlRAXDCF8hKH+H+xgu7EnQvgRZkfUra/85ZCn1m71mEVThoMWjOTsfS/z0KzRd9bA 0gV4TY167g/8lSxSdvwVAH+p2SL1iPwQPJVGuw+rQuLmqzd5l/AAnBeF2ARLts7qMUxWDomk EeTmM/kDiBut7vTTm+B8rCTrnW5Pi19wXI+WBLohDAtu7HLyLzfRDqUJjq/OMZZVuHIJAw=
  • Ironport-hdrordr: A9a23:ekQ6f6DmSlKz/iTlHeg3sceALOsnbusQ8zAXPh9KJCC9I/bzqy nxpp8mPH/P5wr5lktQ/OxoHJPwOU80kqQFmrX5XI3SJTUO3VHFEGgM1+vfKlHbak7DH6tmpN 1dmstFeaLN5DpB/KHHCWCDer5PoeVvsprY49s2p00dMT2CAJsQizuRZDzrcHGfE2J9dOcE/d enl7x6jgvlXU5SQtWwB3EDUeSGj9rXlKj+aRpDIxI88gGBgR6h9ba/SnGjr18jegIK5Y1n3X nOkgT/6Knmm/anyiXE32uWy5hNgtPuxvZKGcTJoMkILTfHjBquee1aKvS/lQFwhNvqxEchkd HKrRtlF8Nv60nJdmXwmhfp0xmI6kda11bSjXujxVfzq83wQzw3T+Bbg5hCTxff4008+Plhza NixQuixtZqJCKFuB64y8nDVhlsmEbxi2Eli/Qvg3tWVpZbQKNNrLYY4FheHP47bW/HAbgcYa dT5fznlbdrmQvwVQGYgoAv+q3nYp0LJGbIfqBY0fblkAS/nxhCvjklLYIk7zU9HakGOuh5Dt T/Q9pVfY51P78rhIJGdZM8qJiMexvwaCOJFl6uCnLaM4xCE07xivfMkcYIDaeRCdc18Kc=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Jun 23, 2022 at 04:47:22PM +0200, Jan Beulich wrote:
> On 23.06.2022 10:24, Roger Pau Monne wrote:
> > Allow selecting the default x2APIC destination mode from Kconfig.
> > Note the default destination mode is still Logical (Cluster) mode.
> > 
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> > ---
> >  xen/arch/x86/Kconfig          | 29 +++++++++++++++++++++++++++++
> >  xen/arch/x86/genapic/x2apic.c |  6 ++++--
> >  2 files changed, 33 insertions(+), 2 deletions(-)
> > 
> > diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
> > index 1e31edc99f..f560dc13f4 100644
> > --- a/xen/arch/x86/Kconfig
> > +++ b/xen/arch/x86/Kconfig
> > @@ -226,6 +226,35 @@ config XEN_ALIGN_2M
> >  
> >  endchoice
> >  
> > +choice
> > +   prompt "x2APIC default destination mode"
> 
> What's the point of using "choice" here, and not a single "bool"?

I think choice better reflects the purpose of the option, it's
selecting between two different modes.  It could be expressed with a
bool, but I think it's less clear.

> > +   default X2APIC_LOGICAL
> > +   ---help---
> 
> Nit: Please don't use ---help--- anymore - we're trying to phase out its
> use as Linux has dropped it altogether (and hence once we update our
> Kconfig, we'd like to change as few places as possible), leaving just
> "help".
> 
> One downside of "choice" (iirc) is that the individual sub-options' help
> text is inaccessible from at least the command line version of kconfig.

Hm, I usually use menuconfig when wanting to poke at options help.

I guess I could introduce a single X2APIC_PHYSICAL bool that starts
with default false and notes that otherwise the destination mode is
logical.

> > +     Specify default destination mode for x2APIC.
> > +
> > +     If unsure, choose "Logical".
> > +
> > +config X2APIC_LOGICAL
> > +   bool "Logical mode"
> > +   ---help---
> > +     Use Logical Destination mode.
> > +
> > +     When using this mode APICs are addressed using the Logical
> > +     Destination mode, which allows for optimized IPI sending,
> > +     but also reduces the amount of vectors available for external
> > +     interrupts when compared to physical mode.
> > +
> > +config X2APIC_PHYS
> 
> X2APIC_PHYSICAL (to be in line with X2APIC_LOGICAL)?

Right, was about to expand it but did consider PHYS to be clear enough
(opposed to using LOG or LOGIC), will expand in next version.

Thanks, Roger.



 


Rackspace

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