From: Nitesh Narayan Lal <nitesh@redhat.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-pci@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
frederic@kernel.org, mtosatti@redhat.com, sassmann@redhat.com,
jesse.brandeburg@intel.com, lihong.yang@intel.com,
jeffrey.t.kirsher@intel.com, jacob.e.keller@intel.com,
jlelli@redhat.com, hch@infradead.org, bhelgaas@google.com,
mike.marciniszyn@intel.com, dennis.dalessandro@intel.com,
thomas.lendacky@amd.com, jiri@nvidia.com, mingo@redhat.com,
peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, lgoncalv@redhat.com
Subject: Re: [PATCH v3 4/4] PCI: Limit pci_alloc_irq_vectors() to housekeeping CPUs
Date: Fri, 25 Sep 2020 19:18:11 -0400 [thread overview]
Message-ID: <0f19925c-a6f7-fbab-46c9-f3af389708d2@redhat.com> (raw)
In-Reply-To: <256490f0-0762-447c-a7be-0e5a6bb04fc4@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 1328 bytes --]
On 9/25/20 5:38 PM, Nitesh Narayan Lal wrote:
> On 9/25/20 4:23 PM, Bjorn Helgaas wrote:
[...]
>>> + /*
>>> + * If we have isolated CPUs for use by real-time tasks, to keep the
>>> + * latency overhead to a minimum, device-specific IRQ vectors are moved
>>> + * to the housekeeping CPUs from the userspace by changing their
>>> + * affinity mask. Limit the vector usage to keep housekeeping CPUs from
>>> + * running out of IRQ vectors.
>>> + */
>>> + if (hk_cpus < num_online_cpus()) {
>>> + if (hk_cpus < min_vecs)
>>> + max_vecs = min_vecs;
>>> + else if (hk_cpus < max_vecs)
>>> + max_vecs = hk_cpus;
>>> + }
>> It seems like you'd want to do this inside
>> pci_alloc_irq_vectors_affinity() since that's an exported interface,
>> and drivers that use it will bypass the limiting you're doing here.
> Good point, few drivers directly use this.
> I took a quick look and it seems I may also have to take the pre and the
> post vectors into consideration.
>
It seems my initial interpretation was incorrect, reserved vecs (pre+post)
should always be less than the min_vecs.
So, FWIU we should be fine in limiting the max_vecs.
I can make this change and do a repost.
Do you have any other concerns with this patch or with any of the other
patches?
[...]
--
Nitesh
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2020-09-25 23:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-25 18:26 [PATCH v3 0/4] isolation: limit msix vectors to housekeeping CPUs Nitesh Narayan Lal
2020-09-25 18:26 ` [PATCH v3 1/4] sched/isolation: API to get number of " Nitesh Narayan Lal
2020-09-25 18:26 ` [PATCH v3 2/4] sched/isolation: Extend nohz_full to isolate managed IRQs Nitesh Narayan Lal
2020-09-25 18:26 ` [PATCH v3 3/4] i40e: Limit msix vectors to housekeeping CPUs Nitesh Narayan Lal
2020-09-25 18:26 ` [PATCH v3 4/4] PCI: Limit pci_alloc_irq_vectors() " Nitesh Narayan Lal
2020-09-25 20:23 ` Bjorn Helgaas
2020-09-25 21:38 ` Nitesh Narayan Lal
2020-09-25 23:18 ` Nitesh Narayan Lal [this message]
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=0f19925c-a6f7-fbab-46c9-f3af389708d2@redhat.com \
--to=nitesh@redhat.com \
--cc=bhelgaas@google.com \
--cc=dennis.dalessandro@intel.com \
--cc=frederic@kernel.org \
--cc=hch@infradead.org \
--cc=helgaas@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=jiri@nvidia.com \
--cc=jlelli@redhat.com \
--cc=juri.lelli@redhat.com \
--cc=lgoncalv@redhat.com \
--cc=lihong.yang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mike.marciniszyn@intel.com \
--cc=mingo@redhat.com \
--cc=mtosatti@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=sassmann@redhat.com \
--cc=thomas.lendacky@amd.com \
--cc=vincent.guittot@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).