From: Christoph Hellwig <hch@infradead.org>
To: Suwan Kim <suwan.kim027@gmail.com>
Cc: mgurtovoy@nvidia.com, linux-block@vger.kernel.org,
mst@redhat.com, virtualization@lists.linux-foundation.org,
hch@infradead.org, stefanha@redhat.com, pbonzini@redhat.com
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>
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next prev parent reply other threads:[~2022-04-06 5:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220405150924.147021-1-suwan.kim027@gmail.com>
2022-04-05 15:46 ` [PATCH v5 0/2] virtio-blk: support polling I/O and mq_ops->queue_rqs() Stefan Hajnoczi
[not found] ` <20220405150924.147021-2-suwan.kim027@gmail.com>
2022-04-06 5:00 ` Christoph Hellwig [this message]
[not found] ` <20220405150924.147021-3-suwan.kim027@gmail.com>
2022-04-06 5:01 ` [PATCH v5 2/2] virtio-blk: support mq_ops->queue_rqs() Christoph Hellwig
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=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).