lkml.org 
[lkml]   [2020]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Patch v1] i40e: limit the msix vectors based on housekeeping CPUs
From
Date

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

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-06-26 22:12    [W:0.061 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site