All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH 1/2] x86/irq: fix calculation of max PV dom0 pIRQs
Date: Thu, 21 Nov 2024 12:39:06 +0100	[thread overview]
Message-ID: <f0c0cdca-e6a8-47c9-934a-85a91609e9e7@suse.com> (raw)
In-Reply-To: <Zz8Tugu22NPzAQUo@macbook>

On 21.11.2024 12:04, Roger Pau Monné wrote:
> On Thu, Nov 21, 2024 at 11:49:44AM +0100, Jan Beulich wrote:
>> On 20.11.2024 12:35, Roger Pau Monne wrote:
>>> The current calculation of PV dom0 pIRQs uses:
>>>
>>> n = min(fls(num_present_cpus()), dom0_max_vcpus());
>>>
>>> The usage of fls() is wrong, as num_present_cpus() already returns the number
>>> of present CPUs, not the bitmap mask of CPUs.
>>
>> Hmm. Perhaps that use of fls() should have been accompanied by a comment, but
>> I think it might have been put there intentionally, to avoid linear growth.
>> Which isn't to say that I mind the adjustment, especially now that we don't
>> use any clustered modes anymore for I/O interrupts. I'm merely questioning
>> the Fixes: tag, and with that whether / how far to backport.
> 
> Hm, sorry I've assumed the fls() was a typo.  It seems wrong to cap
> dom0 vCPUs with the fls of the present CPUs number.  For consistency,
> if the intention was to use fls to limit growth, I would have expected
> to also be applied to the dom0 number of vCPUs.

FTR: My vague recollection (it has been nearly 10 years) is that I first had
it there, too. Until I realized that it hardly ever would have any effect,
because of the min(). And for Dom0-s with extremely few vCPU-s it seemed
reasonable to not apply that cap there.

Jan


  reply	other threads:[~2024-11-21 11:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-20 11:35 [PATCH 0/2] x86/irq: fix calculation of maximum pIRQs for dom0 Roger Pau Monne
2024-11-20 11:35 ` [PATCH 1/2] x86/irq: fix calculation of max PV dom0 pIRQs Roger Pau Monne
2024-11-20 12:06   ` Andrew Cooper
2024-11-21 10:49   ` Jan Beulich
2024-11-21 11:04     ` Roger Pau Monné
2024-11-21 11:39       ` Jan Beulich [this message]
2024-11-22  8:01         ` Roger Pau Monné
2024-11-22  9:27           ` Jan Beulich
2024-11-20 11:35 ` [PATCH 2/2] x86/pvh: also print hardware domain pIRQ limit for PVH Roger Pau Monne
2024-11-20 11:45   ` Andrew Cooper
2024-11-21 10:54   ` Jan Beulich
2024-11-21 11:08     ` Roger Pau Monné
2024-11-21 11:14       ` Andrew Cooper
2024-11-21 11:24         ` Roger Pau Monné
2024-11-21 11:27           ` Jan Beulich

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=f0c0cdca-e6a8-47c9-934a-85a91609e9e7@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.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.