From: Sagi Grimberg <sagi@grimberg.me>
To: Bart Van Assche <Bart.VanAssche@sandisk.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"target-devel@vger.kernel.org" <target-devel@vger.kernel.org>
Subject: Re: [PATCH rfc 04/10] block: Add a non-selective polling interface
Date: Mon, 13 Mar 2017 10:15:13 +0200 [thread overview]
Message-ID: <b8124df3-bd09-2eb2-9899-3c9195605510@grimberg.me> (raw)
In-Reply-To: <1489076712.2597.1.camel@sandisk.com>
>> +int blk_mq_poll_batch(struct request_queue *q, unsigned int batch)
>> +{
>> + struct blk_mq_hw_ctx *hctx;
>> +
>> + if (!q->mq_ops || !q->mq_ops->poll_batch)
>> + return 0;
>> +
>> + hctx = blk_mq_map_queue(q, smp_processor_id());
>> + return q->mq_ops->poll_batch(hctx, batch);
>> +}
>> +EXPORT_SYMBOL_GPL(blk_mq_poll_batch);
>
> A new exported function without any documentation? Wow.
I just copied blk_mq_poll export...
> Please add a header
> above this function that documents at least which other completion processing
> code can execute concurrently with this function and from which contexts the
> other completion processing code can be called (e.g. blk_mq_poll() and
> .complete()).
I can do that, I'll document blk_mq_poll too..
> Why to return if (!q->mq_ops || !q->mq_ops->poll_batch)? Shouldn't that be a
> WARN_ON_ONCE() instead? I think it is an error to calling blk_mq_poll_batch()
> against a queue that does not define .poll_batch().
Not really, we don't know if the block driver actually supports
poll_batch (or poll for that matter). Instead of conditioning in the
call-site, we condition within the call.
Its not really a bug, its harmless.
> Additionally, I think making the hardware context an argument of this function
> instead of using blk_mq_map_queue(q, smp_processor_id()) would make this
> function much more versatile.
What do you mean? remember that the callers interface to the device is
a request queue, it doesn't even know if its a blk-mq device. Can you
explain in more details what you would like to see?
next prev parent reply other threads:[~2017-03-13 8:15 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-09 13:16 [PATCH rfc 00/10] non selective polling block interface Sagi Grimberg
2017-03-09 13:16 ` [PATCH rfc 01/10] nvme-pci: Split __nvme_process_cq to poll and handle Sagi Grimberg
2017-03-09 13:57 ` Johannes Thumshirn
2017-03-22 19:07 ` Christoph Hellwig
2017-03-09 13:16 ` [PATCH rfc 02/10] nvme-pci: Add budget to __nvme_process_cq Sagi Grimberg
2017-03-09 13:46 ` Johannes Thumshirn
2017-03-22 19:08 ` Christoph Hellwig
2017-03-09 13:16 ` [PATCH rfc 03/10] nvme-pci: open-code polling logic in nvme_poll Sagi Grimberg
2017-03-09 13:56 ` Johannes Thumshirn
2017-03-22 19:09 ` Christoph Hellwig
2017-03-09 13:16 ` [PATCH rfc 04/10] block: Add a non-selective polling interface Sagi Grimberg
2017-03-09 13:44 ` Johannes Thumshirn
2017-03-10 3:04 ` Damien Le Moal
2017-03-13 8:26 ` Sagi Grimberg
2017-03-09 16:25 ` Bart Van Assche
2017-03-13 8:15 ` Sagi Grimberg [this message]
2017-03-14 21:21 ` Bart Van Assche
2017-03-09 13:16 ` [PATCH rfc 05/10] nvme-pci: Support blk_poll_batch Sagi Grimberg
2017-03-09 13:16 ` [PATCH rfc 06/10] IB/cq: Don't force IB_POLL_DIRECT poll context for ib_process_cq_direct Sagi Grimberg
2017-03-09 16:30 ` Bart Van Assche
2017-03-13 8:24 ` Sagi Grimberg
2017-03-14 21:32 ` Bart Van Assche
2017-03-09 13:16 ` [PATCH rfc 07/10] nvme-rdma: Don't rearm the CQ when polling directly Sagi Grimberg
2017-03-09 13:52 ` Johannes Thumshirn
2017-03-09 13:16 ` [PATCH rfc 08/10] nvme-rdma: Support blk_poll_batch Sagi Grimberg
2017-03-09 13:16 ` [PATCH rfc 09/10] nvmet: Use non-selective polling Sagi Grimberg
2017-03-09 13:54 ` Johannes Thumshirn
2017-03-09 13:16 ` [PATCH rfc 10/10] target: " Sagi Grimberg
2017-03-18 23:58 ` Nicholas A. Bellinger
2017-03-21 11:35 ` Sagi Grimberg
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=b8124df3-bd09-2eb2-9899-3c9195605510@grimberg.me \
--to=sagi@grimberg.me \
--cc=Bart.VanAssche@sandisk.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-rdma@vger.kernel.org \
--cc=target-devel@vger.kernel.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).