From: Ming Lei <ming.lei@redhat.com>
To: Keith Busch <kbusch@kernel.org>
Cc: Keith Busch <kbusch@meta.com>,
linux-nvme@lists.infradead.org, hch@lst.de, ming.lei@redhat.com
Subject: Re: [PATCHv2] nvme-pci: allow unmanaged interrupts
Date: Sat, 11 May 2024 08:44:50 +0800 [thread overview]
Message-ID: <Zj6/gqxxDD74IYR6@fedora> (raw)
In-Reply-To: <Zj6745UDnwX1BteO@kbusch-mbp.dhcp.thefacebook.com>
On Fri, May 10, 2024 at 06:29:23PM -0600, Keith Busch wrote:
> On Sat, May 11, 2024 at 07:47:26AM +0800, Ming Lei wrote:
> > On Fri, May 10, 2024 at 10:46:45AM -0700, Keith Busch wrote:
> > > map->queue_offset = qoff;
> > > - if (i != HCTX_TYPE_POLL && offset)
> > > + if (managed_irqs && i != HCTX_TYPE_POLL && offset)
> > > blk_mq_pci_map_queues(map, to_pci_dev(dev->dev), offset);
> > > else
> > > blk_mq_map_queues(map);
> >
> > Now the queue mapping is built with nothing from irq affinity which is
> > setup from userspace, and performance could be pretty bad.
>
> This just decouples the sw from the irq mappings. Every cpu still has a
> blk-mq hctx, there's just no connection to the completing CPU if you
> enable this.
I don't object to unmanaged irq, which is actually supported in some scsi
hosts too, but all or most of them still wire pci irq vector affinities with
hw queue, instead of using mapping from blk_mq_map_queues() simply.
>
> Everyone expects nvme performance will suffer. IO latency and CPU
> efficieny are not everyone's top priority, so allowing people to
> optimize for something else seems like a reasonable request.
I guess more people may be interested in 'something else', care to share
them in the commit log, cause nvme is going to support it.
>
> > Is there any benefit to use unmanaged irq in this way?
>
> The immediate desire is more predictable scheduling on a subset of CPUs
> by steering hardware interrupts somewhere else. It's the same reason
> RDMA undid managed interrupts.
>
> 231243c82793428 ("Revert "mlx5: move affinity hints assignments to generic code")
The above commit only mentions it becomes not flexible since user can't
adjust irq affinity any more.
It is understandable for network, there is long history people need to adjust
irq affinity from user space.
Thanks,
Ming
next prev parent reply other threads:[~2024-05-11 0:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-10 17:46 [PATCHv2] nvme-pci: allow unmanaged interrupts Keith Busch
2024-05-10 23:47 ` Ming Lei
2024-05-11 0:29 ` Keith Busch
2024-05-11 0:44 ` Ming Lei [this message]
2024-05-12 14:16 ` Sagi Grimberg
2024-05-12 22:05 ` Keith Busch
2024-05-13 1:12 ` Ming Lei
2024-05-13 4:09 ` 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=Zj6/gqxxDD74IYR6@fedora \
--to=ming.lei@redhat.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=kbusch@meta.com \
--cc=linux-nvme@lists.infradead.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