All of lore.kernel.org
 help / color / mirror / Atom feed
From: Suwan Kim <suwan.kim027@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: mst@redhat.com, jasowang@redhat.com, stefanha@redhat.com,
	pbonzini@redhat.com, mgurtovoy@nvidia.com,
	dongli.zhang@oracle.com,
	virtualization@lists.linux-foundation.org,
	linux-block@vger.kernel.org
Subject: Re: [PATCH v5 1/2] virtio-blk: support polling I/O
Date: Wed, 6 Apr 2022 22:41:29 +0900	[thread overview]
Message-ID: <Yk2YiSIB2OZv1FEb@localhost.localdomain> (raw)
In-Reply-To: <Yk0ebS3cl95XtOuj@infradead.org>

On Tue, Apr 05, 2022 at 10:00:29PM -0700, Christoph Hellwig wrote:
> On Wed, Apr 06, 2022 at 12:09:23AM +0900, Suwan Kim wrote:
> > +        for (i = 0; i < num_vqs - num_poll_vqs; i++) {
> > +                callbacks[i] = virtblk_done;
> > +                snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req.%d", i);
> > +                names[i] = vblk->vqs[i].name;
> > +        }
> > +
> > +        for (; i < num_vqs; i++) {
> > +                callbacks[i] = NULL;
> > +                snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req_poll.%d", i);
> > +                names[i] = vblk->vqs[i].name;
> > +        }
> 
> This uses spaces for indentation.

Oh my mistake. I will fix it.

> > +		/*
> > +		 * Regular queues have interrupts and hence CPU affinity is
> > +		 * defined by the core virtio code, but polling queues have
> > +		 * no interrupts so we let the block layer assign CPU affinity.
> > +		 */
> > +		if (i != HCTX_TYPE_POLL)
> > +			blk_mq_virtio_map_queues(&set->map[i], vblk->vdev, 0);
> > +		else
> > +			blk_mq_map_queues(&set->map[i]);
> 
> Nit, but I would have just done a "positive" check here as that is ab it
> easier to read:
> 
> 		if (i == HCTX_TYPE_POLL)
> 			blk_mq_map_queues(&set->map[i]);
> 		else
> 			blk_mq_virtio_map_queues(&set->map[i], vblk->vdev, 0);

I agree. I will fix it.
Thanks for the feedback!

Regards,
Suwan Kim

>
> Otherwise looks good:
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>

  reply	other threads:[~2022-04-06 16:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05 15:09 [PATCH v5 0/2] virtio-blk: support polling I/O and mq_ops->queue_rqs() Suwan Kim
2022-04-05 15:09 ` [PATCH v5 1/2] virtio-blk: support polling I/O Suwan Kim
2022-04-06  1:43   ` Elliott, Robert (Servers)
2022-04-06 13:36     ` Suwan Kim
2022-04-06  5:00   ` Christoph Hellwig
2022-04-06  5:00     ` Christoph Hellwig
2022-04-06 13:41     ` Suwan Kim [this message]
2022-04-06 14:10       ` Max Gurtovoy
2022-04-05 15:09 ` [PATCH v5 2/2] virtio-blk: support mq_ops->queue_rqs() Suwan Kim
2022-04-06  5:01   ` Christoph Hellwig
2022-04-06  5:01     ` Christoph Hellwig
2022-04-05 15:46 ` [PATCH v5 0/2] virtio-blk: support polling I/O and mq_ops->queue_rqs() Stefan Hajnoczi
2022-04-05 15:46   ` Stefan Hajnoczi

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=Yk2YiSIB2OZv1FEb@localhost.localdomain \
    --to=suwan.kim027@gmail.com \
    --cc=dongli.zhang@oracle.com \
    --cc=hch@infradead.org \
    --cc=jasowang@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=mgurtovoy@nvidia.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtualization@lists.linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.