[PATCH 2/2] nvme: use blk-mq polling for uring commands

Kanchan Joshi joshiiitr at gmail.com
Mon Apr 3 05:42:55 PDT 2023


On Wed, Mar 29, 2023 at 9:41 PM Keith Busch <kbusch at kernel.org> wrote:
>
> On Wed, Mar 29, 2023 at 02:16:18PM +0530, Kanchan Joshi wrote:
> > On Tue, Mar 28, 2023 at 08:52:53AM -0600, Keith Busch wrote:
> > > > > +       else if (issue_flags & IO_URING_F_IOPOLL)
> > > > > +               ioucmd->flags |= IORING_URING_CMD_NOPOLL;
> > > >
> > > > If IO_URING_F_IOPOLL would have come here as part of "ioucmd->flags", we
> > > > could have just cleared that here. That would avoid the need of NOPOLL flag.
> > > > That said, I don't feel strongly about new flag too. You decide.
> > >
> > > IO_URING_F_IOPOLL, while named in an enum that sounds suspiciouly like it is
> > > part of ioucmd->flags, is actually ctx flags, so a little confusing. And we
> > > need to be a litle careful here: the existing ioucmd->flags is used with uapi
> > > flags.
> >
> > Indeed. If this is getting crufty, series can just enable polling on
> > no-payload requests. Reducing nvme handlers - for another day.
>
> Well something needs to be done about multipath since it's broken today: if the
> path changes between submission and poll, we'll consult the wrong queue for
> polling enabled. This could cause a missed polling opprotunity, polling a
> pointer that isn't a bio, or poll an irq enabled cq. All are bad.

I see, that is because "nvme_find_path" was used.
How about using top 4 bits of "ioucmd->flags" for an internal flag.
That means we can support max 28 flags for "sqe->uring_cmd_flags".
That perhaps is not too bad, given that we use one bit at the moment?



More information about the Linux-nvme mailing list