Re: [PATCHv3 2/4] nvme: use blk_execute_rq() for passthrough commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 26, 2021 at 02:17:23PM +0530, Kanchan Joshi wrote:
> On Sat, May 22, 2021 at 2:05 AM Keith Busch <kbusch@xxxxxxxxxx> wrote:
> >
> > The generic blk_execute_rq() knows how to handle polled completions. Use
> > that instead of implementing an nvme specific handler.
> >
> > Signed-off-by: Keith Busch <kbusch@xxxxxxxxxx>
> > ---
> > No changes since v2
> >
> >  drivers/nvme/host/core.c    | 38 +++++--------------------------------
> >  drivers/nvme/host/fabrics.c | 13 ++++++-------
> >  drivers/nvme/host/fabrics.h |  2 +-
> >  drivers/nvme/host/fc.c      |  2 +-
> >  drivers/nvme/host/nvme.h    |  2 +-
> >  drivers/nvme/host/rdma.c    |  3 +--
> >  drivers/nvme/host/tcp.c     |  2 +-
> >  drivers/nvme/target/loop.c  |  2 +-
> >  8 files changed, 17 insertions(+), 47 deletions(-)
> >
> > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> > index 762125f2905f..1a73eed61eee 100644
> > --- a/drivers/nvme/host/core.c
> > +++ b/drivers/nvme/host/core.c
> > @@ -1012,31 +1012,6 @@ blk_status_t nvme_setup_cmd(struct nvme_ns *ns, struct request *req)
> >  }
> >  EXPORT_SYMBOL_GPL(nvme_setup_cmd);
> >
> > -static void nvme_end_sync_rq(struct request *rq, blk_status_t error)
> > -{
> > -       struct completion *waiting = rq->end_io_data;
> > -
> > -       rq->end_io_data = NULL;
> > -       complete(waiting);
> > -}
> > -
> > -static void nvme_execute_rq_polled(struct request_queue *q,
> > -               struct gendisk *bd_disk, struct request *rq, int at_head)
> > -{
> > -       DECLARE_COMPLETION_ONSTACK(wait);
> > -
> > -       WARN_ON_ONCE(!test_bit(QUEUE_FLAG_POLL, &q->queue_flags));
> > -
> > -       rq->cmd_flags |= REQ_HIPRI;
> 
> The new code doesn't retain this flag.
> Looks good otherwise.

The flag is only used to select an apporpriate hctx. We've explicitly
selected a polling hctx in this path already, so the flag is
unnecessary.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux