On 4/6/2022 4:41 PM, Suwan Kim wrote:
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!
Looks good with fixing Christoph and Robert comments (memset removal).
Please run checkpatch.pl on the new version to verify we don't have more
issues such as spaces vs. tabs..
Reviewed-by: Max Gurtovoy <mgurtovoy@xxxxxxxxxx>
Regards,
Suwan Kim
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@xxxxxx>