From: hch@infradead.org (Christoph Hellwig)
Subject: [PATCH 2/2] NVMe: Remove hctx reliance for multi-namespace
Date: Fri, 29 May 2015 09:29:44 -0700 [thread overview]
Message-ID: <20150529162944.GA31249@infradead.org> (raw)
In-Reply-To: <1432838222-4076-2-git-send-email-keith.busch@intel.com>
> +static void nvme_exit_tags(void *data, unsigned int hctx_idx)
> {
> + struct nvme_dev *dev = data;
> + struct nvme_queue *nvmeq = dev->queues[
> + (hctx_idx % dev->queue_count) + 1];
> + nvmeq->tags = NULL;
> +}
>
> +static int nvme_init_tags(struct blk_mq_tags *tags, void *data,
> + unsigned int hctx_idx)
> +{
> + struct nvme_dev *dev = data;
> + struct nvme_queue *nvmeq = dev->queues[
> + (hctx_idx % dev->queue_count) + 1];
> + WARN_ON(nvmeq->tags);
> + nvmeq->tags = tags;
> + return 0;
I'd rather do the runtime indexing with the qid into the tags array than
adding these methods. I also don't see why you need the modulo
arithmetic.
Otherwise the series looks nice to me.
next prev parent reply other threads:[~2015-05-29 16:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 18:37 [PATCH 1/2] blk-mq: Shared tag enhancements Keith Busch
2015-05-28 18:37 ` [PATCH 2/2] NVMe: Remove hctx reliance for multi-namespace Keith Busch
2015-05-29 16:29 ` Christoph Hellwig [this message]
2015-05-29 17:58 ` Keith Busch
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=20150529162944.GA31249@infradead.org \
--to=hch@infradead.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