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

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.

> +		/*
> +		 * 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);

Otherwise looks good:

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

  parent reply	other threads:[~2022-04-06  7:25 UTC|newest]

Thread overview: 10+ 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 [this message]
2022-04-06 13:41     ` Suwan Kim
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-05 15:46 ` [PATCH v5 0/2] virtio-blk: support polling I/O and mq_ops->queue_rqs() 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=Yk0ebS3cl95XtOuj@infradead.org \
    --to=hch@infradead.org \
    --cc=dongli.zhang@oracle.com \
    --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=suwan.kim027@gmail.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 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 NNTP newsgroup(s).