linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nitesh Narayan Lal <nitesh@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-kernel@vger.kernel.org, frederic@kernel.org,
	mtosatti@redhat.com, sassmann@redhat.com,
	jeffrey.t.kirsher@intel.com, jacob.e.keller@intel.com,
	jlelli@redhat.com
Subject: Re: [Patch v1] i40e: limit the msix vectors based on housekeeping CPUs
Date: Fri, 26 Jun 2020 16:11:24 -0400	[thread overview]
Message-ID: <52220ae0-0ed5-f638-ebe2-725e0333ea6a@redhat.com> (raw)
In-Reply-To: <20200616080309.GA21210@infradead.org>


[-- Attachment #1.1: Type: text/plain, Size: 1276 bytes --]


On 6/16/20 4:03 AM, Christoph Hellwig wrote:
> On Mon, Jun 15, 2020 at 04:21:25PM -0400, Nitesh Narayan Lal wrote:
>> +	hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ;
>> +	mask = housekeeping_cpumask(hk_flags);
>> +	cpus = cpumask_weight(mask);
> Code like this has no business inside a driver.  Please provide a
> proper core API for it instead.  Also please wire up
> pci_alloc_irq_vectors* to use this API as well.
>

Hi Christoph,

I have been looking into using nr_houskeeping_* API that I will be defining
within pci_alloc_irq_vectors* to limit the nr of vectors.
However, I am wondering about a few things:

- Some of the drivers such as i40e until now, use the num_online CPUs to
  restrict the number of vectors that they should create. Will it make sense if
  I restrict the maximum vectors requested based on
  nr_online/housekeeping_cpus (Though I will have to make sure that the
  min_vecs is always satisfied)?

  The other option would be to check for the total available vectors in all
  online/housekeeping CPUs for limiting the maxvecs, this way will probably be
  more accurate?

- Another thing that I am wondering about is the right way to test this change.

Please let me know if you have any suggestions?

-- 
Nitesh


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2020-06-26 20:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-15 20:21 [PATCH v1 0/1] limit the i40e msix vectors based on housekeeping CPUs Nitesh Narayan Lal
2020-06-15 20:21 ` [Patch v1] i40e: limit the " Nitesh Narayan Lal
2020-06-15 20:48   ` Keller, Jacob E
2020-06-15 20:55     ` Nitesh Narayan Lal
2020-06-16  8:03   ` Christoph Hellwig
2020-06-16 17:29     ` Nitesh Narayan Lal
2020-06-26 20:11     ` 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=52220ae0-0ed5-f638-ebe2-725e0333ea6a@redhat.com \
    --to=nitesh@redhat.com \
    --cc=frederic@kernel.org \
    --cc=hch@infradead.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jlelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=sassmann@redhat.com \
    /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).