From: Ming Lei <ming.lei@redhat.com>
To: Baolin Wang <baolin.wang@linaro.org>
Cc: axboe@kernel.dk, adrian.hunter@intel.com, ulf.hansson@linaro.org,
zhang.lyra@gmail.com, orsonzhai@gmail.com, arnd@arndb.de,
linus.walleij@linaro.org, vincent.guittot@linaro.org,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-block@vger.kernel.org
Subject: Re: [RFC PATCH 1/7] blk-mq: Export blk_mq_hctx_has_pending() function
Date: Mon, 22 Jul 2019 22:19:41 +0800 [thread overview]
Message-ID: <20190722141940.GA26528@ming.t460p> (raw)
In-Reply-To: <94a0d20e6304b909391abd9a425c71c376cad964.1563782844.git.baolin.wang@linaro.org>
On Mon, Jul 22, 2019 at 09:09:36PM +0800, Baolin Wang wrote:
> Some SD/MMC host controllers can support packed command or packed request,
> that means we can package several requests to host controller at one time
> to improve performence. And this patch set will introduce MMC packed function
> to support this feature by following patches.
>
> To support MMC packed function, the MMC layer need to know if there are
> requests are pending now in hardware queue to help to combine requests
> as much as possible. If we know there are requests pending in hardware
> queue, then we should not package requests to host controller immediately,
> instead we should collect more requests into MMC packed queue to be packed
> to host controller with packed condition.
>
> Thus export this function for MMC packed function.
>
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
> ---
> block/blk-mq.c | 3 ++-
> include/linux/blk-mq.h | 1 +
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index b038ec6..5bd4ef9 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -63,12 +63,13 @@ static int blk_mq_poll_stats_bkt(const struct request *rq)
> * Check if any of the ctx, dispatch list or elevator
> * have pending work in this hardware queue.
> */
> -static bool blk_mq_hctx_has_pending(struct blk_mq_hw_ctx *hctx)
> +bool blk_mq_hctx_has_pending(struct blk_mq_hw_ctx *hctx)
> {
> return !list_empty_careful(&hctx->dispatch) ||
> sbitmap_any_bit_set(&hctx->ctx_map) ||
> blk_mq_sched_has_work(hctx);
> }
> +EXPORT_SYMBOL_GPL(blk_mq_hctx_has_pending);
Just wondering why you don't use the 'last' field of 'struct blk_mq_queue_data',
which is passed to .queue_rq(), and supposed for implementing batch submission.
Thanks,
Ming
next prev parent reply other threads:[~2019-07-22 14:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 13:09 [RFC PATCH 0/7] Add MMC packed function Baolin Wang
2019-07-22 13:09 ` [RFC PATCH 1/7] blk-mq: Export blk_mq_hctx_has_pending() function Baolin Wang
2019-07-22 14:19 ` Ming Lei [this message]
2019-07-23 3:12 ` Baolin Wang
2019-07-23 3:31 ` Ming Lei
2019-07-23 7:15 ` Baolin Wang
2019-07-22 13:09 ` [RFC PATCH 2/7] mmc: core: Add MMC packed request function Baolin Wang
2019-07-22 13:09 ` [RFC PATCH 3/7] mmc: host: sdhci: Introduce ADMA3 transfer mode Baolin Wang
2019-07-22 13:09 ` [RFC PATCH 4/7] mmc: host: sdhci: Factor out the command configuration Baolin Wang
2019-07-22 13:09 ` [RFC PATCH 5/7] mmc: host: sdhci: Remove redundant sg_count member of struct sdhci_host Baolin Wang
2019-07-22 13:09 ` [RFC PATCH 6/7] mmc: host: sdhci: Add MMC packed request support Baolin Wang
2019-07-22 13:09 ` [RFC PATCH 7/7] mmc: host: sdhci-sprd: " Baolin Wang
2019-08-12 5:20 ` [RFC PATCH 0/7] Add MMC packed function Baolin Wang
2019-08-12 8:58 ` Adrian Hunter
2019-08-12 9:44 ` Baolin Wang
2019-08-12 10:50 ` Adrian Hunter
2019-08-12 11:29 ` Baolin Wang
2019-08-16 2:09 ` Baolin Wang
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=20190722141940.GA26528@ming.t460p \
--to=ming.lei@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=arnd@arndb.de \
--cc=axboe@kernel.dk \
--cc=baolin.wang@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=orsonzhai@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=vincent.guittot@linaro.org \
--cc=zhang.lyra@gmail.com \
/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).