Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Olivier Langlois <olivier@trillion01.com>
To: linux-pci@vger.kernel.org
Cc: paulmck@kernel.org
Subject: Re: where is the irq effective affinity set from pci_alloc_irq_vectors_affinity()?
Date: Mon, 05 Aug 2024 03:08:06 -0400	[thread overview]
Message-ID: <ac0ac2799fe78b1541faeb285ecac1cb8ab3f7e9.camel@trillion01.com> (raw)
In-Reply-To: <ce4ce0bb8b083f1fa23c7231d809a05b7728ff53.camel@trillion01.com>

On Sun, 2024-08-04 at 16:14 -0400, Olivier Langlois wrote:
> I am trying to understand the result that the nvme driver has when it
> calls pci_alloc_irq_vectors_affinity() from nvme_setup_irqs()
> (drivers/nvme/host/pci.c)
> 
> $ cat /proc/interrupts | grep nvme
>  63:          9          0          0          0  PCI-MSIX-
> 0000:00:04.0
> 0-edge      nvme0q0
>  64:          0          0          0     237894  PCI-MSIX-
> 0000:00:04.0
> 1-edge      nvme0q1
> 
> $ cat /proc/irq/64/smp_affinity_list
> 0-3
> 
> $ cat /proc/irq/64/effective_affinity_list 
> 3
> 
> I think that this happens somewhere below pci_msi_setup_msi_irqs()
> (drivers/pci/msi/irqdomain.c)
> but I am losing track of what is done precisely because I am not sure
> of what is the irq_domain on my system.
> 
> I have experimented by playing with the nvme io queues num that is
> passed to pci_msi_setup_msi_irqs()
> as the max_vectors params.
> 
> The set irq effective affinity appears to always be the last cpu of
> the
> affinity mask.
> 
> I would like to have some control on the selected effective_affinity
> as
> I am trying to use NOHZ_FULL effectively on my system.
> 
> NOTE:
> I am NOT using irqbalance
> 
> thank you,
> 
I have found

arch/x86/kernel/apic/vector.c and kernel/irq/matrix.c

I think that matrix_find_best_cpu() should consider if a CPU is
NOHZ_FULL and NOT report it as the best cpu if there are other
options...

I'll try to play with the idea and report back if I get some success
with it...

Greetings,


      reply	other threads:[~2024-08-05  7:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-04 20:14 where is the irq effective affinity set from pci_alloc_irq_vectors_affinity()? Olivier Langlois
2024-08-05  7:08 ` Olivier Langlois [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=ac0ac2799fe78b1541faeb285ecac1cb8ab3f7e9.camel@trillion01.com \
    --to=olivier@trillion01.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=paulmck@kernel.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