LKML Archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Keith Busch <kbusch@kernel.org>, Ming Lei <ming.lei@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>, Keith Busch <kbusch@meta.com>,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] nvme-pci: allow unmanaged interrupts
Date: Sun, 12 May 2024 08:35:55 +0200	[thread overview]
Message-ID: <87r0e7mt9w.ffs@tglx> (raw)
In-Reply-To: <Zj6-1sXvUNZWO1pB@kbusch-mbp.dhcp.thefacebook.com>

On Fri, May 10 2024 at 18:41, Keith Busch wrote:
> On Sat, May 11, 2024 at 07:50:21AM +0800, Ming Lei wrote:
>> Can you explain a bit why it is a no-op? If only isolated CPUs are
>> spread on one queue, there will be no IO originated from these isolated
>> CPUs, that is exactly what the isolation needs.
>
> The "isolcpus=managed_irq," option doesn't limit the dispatching CPUs.
> It only limits where the managed irq will assign the effective_cpus as a
> best effort.
>
> Example, I boot with a system with 4 threads, one nvme device, and
> kernel parameter:
>
>   isolcpus=managed_irq,2-3
>
> Run this:
>
>   for i in $(seq 0 3); do taskset -c $i dd if=/dev/nvme0n1 of=/dev/null bs=4k count=1000 iflag=direct; done
>
> Check /proc/interrupts | grep nvme0:
>
>            CPU0       CPU1       CPU2       CPU3
> ..
>  26:       1000          0          0          0  PCI-MSIX-0000:00:05.0   1-edge      nvme0q1
>  27:          0       1004          0          0  PCI-MSIX-0000:00:05.0   2-edge      nvme0q2
>  28:          0          0       1000          0  PCI-MSIX-0000:00:05.0   3-edge      nvme0q3
>  29:          0          0          0       1043  PCI-MSIX-0000:00:05.0   4-edge      nvme0q4
>
> The isolcpus did nothing becuase the each vector's mask had just one
> cpu; there was no where else that the managed irq could send it. The
> documentation seems to indicate that was by design as a "best effort".

That's expected as you pin the I/O operation on the isolated CPUs which
in turn makes them use the per CPU queue.

The isolated CPUs are only excluded for device management interrupts,
but not for the affinity spread of the queues.

Thanks,

        tglx

  parent reply	other threads:[~2024-05-12  6:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10 14:14 [PATCH 1/2] genirq/affinity: remove rsvd check against minvec Keith Busch
2024-05-10 14:14 ` [PATCH 2/2] nvme-pci: allow unmanaged interrupts Keith Busch
2024-05-10 15:10   ` Christoph Hellwig
2024-05-10 16:20     ` Keith Busch
2024-05-10 23:50       ` Ming Lei
2024-05-11  0:41         ` Keith Busch
2024-05-11  0:59           ` Ming Lei
2024-05-12  6:35           ` Thomas Gleixner [this message]
2024-05-20 15:37             ` Christoph Hellwig
2024-05-20 20:34               ` Thomas Gleixner
2024-05-21  2:31               ` Ming Lei
2024-05-21  8:38                 ` Thomas Gleixner
2024-05-21 10:06                   ` Frederic Weisbecker
2024-05-13  7:33     ` Benjamin Meier
2024-05-13  8:39       ` Ming Lei
2024-05-13  8:59         ` Benjamin Meier
2024-05-13  9:25           ` Ming Lei
2024-05-13 12:33             ` Benjamin Meier
2024-05-13 13:12     ` Bart Van Assche
2024-05-10 15:15 ` [PATCH 1/2] genirq/affinity: remove rsvd check against minvec Ming Lei
2024-05-10 16:47   ` Keith Busch

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=87r0e7mt9w.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=kbusch@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=ming.lei@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 read-only IMAP folder(s) and NNTP newsgroup(s).