Linux-Block Archive on lore.kernel.org
 help / color / Atom feed
* [RFC PATCH 2/2] bfq/mq-deadline: remove redundant check for passthrough request
@ 2021-04-15  3:43 Lin Feng
  2021-04-16  2:14 ` Ming Lei
  2021-04-16 12:09 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Lin Feng @ 2021-04-15  3:43 UTC (permalink / raw)
  To: axboe, paolo.valente; +Cc: linux-block, ming.lei, linf, linux-kernel

Since commit 01e99aeca39796003 'blk-mq: insert passthrough request into
hctx->dispatch directly', passthrough request should not appear in
IO-scheduler any more, so blk_rq_is_passthrough checking in addon IO
schedulers is redundant.

(Notes: this patch passes generic IO load test with hdds under SAS
controller and hdds under AHCI controller but obviously not covers all.
Not sure if passthrough request can still escape into IO scheduler from
blk_mq_sched_insert_requests, which is used by blk_mq_flush_plug_list and
has lots of indirect callers.)

Signed-off-by: Lin Feng <linf@wangsu.com>
---
 block/bfq-iosched.c | 2 +-
 block/mq-deadline.c | 7 ++-----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 95586137194e..b827c9212b02 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -5627,7 +5627,7 @@ static void bfq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
 
 	spin_lock_irq(&bfqd->lock);
 	bfqq = bfq_init_rq(rq);
-	if (!bfqq || at_head || blk_rq_is_passthrough(rq)) {
+	if (!bfqq || at_head) {
 		if (at_head)
 			list_add(&rq->queuelist, &bfqd->dispatch);
 		else
diff --git a/block/mq-deadline.c b/block/mq-deadline.c
index f3631a287466..04aded71ead2 100644
--- a/block/mq-deadline.c
+++ b/block/mq-deadline.c
@@ -500,11 +500,8 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
 
 	trace_block_rq_insert(rq);
 
-	if (at_head || blk_rq_is_passthrough(rq)) {
-		if (at_head)
-			list_add(&rq->queuelist, &dd->dispatch);
-		else
-			list_add_tail(&rq->queuelist, &dd->dispatch);
+	if (at_head) {
+		list_add(&rq->queuelist, &dd->dispatch);
 	} else {
 		deadline_add_rq_rb(dd, rq);
 
-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH 2/2] bfq/mq-deadline: remove redundant check for passthrough request
  2021-04-15  3:43 [RFC PATCH 2/2] bfq/mq-deadline: remove redundant check for passthrough request Lin Feng
@ 2021-04-16  2:14 ` Ming Lei
  2021-04-16 12:09 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Ming Lei @ 2021-04-16  2:14 UTC (permalink / raw)
  To: Lin Feng; +Cc: axboe, paolo.valente, linux-block, linux-kernel

On Thu, Apr 15, 2021 at 11:43:26AM +0800, Lin Feng wrote:
> Since commit 01e99aeca39796003 'blk-mq: insert passthrough request into
> hctx->dispatch directly', passthrough request should not appear in
> IO-scheduler any more, so blk_rq_is_passthrough checking in addon IO
> schedulers is redundant.
> 
> (Notes: this patch passes generic IO load test with hdds under SAS
> controller and hdds under AHCI controller but obviously not covers all.
> Not sure if passthrough request can still escape into IO scheduler from
> blk_mq_sched_insert_requests, which is used by blk_mq_flush_plug_list and
> has lots of indirect callers.)
> 
> Signed-off-by: Lin Feng <linf@wangsu.com>
> ---
>  block/bfq-iosched.c | 2 +-
>  block/mq-deadline.c | 7 ++-----
>  2 files changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
> index 95586137194e..b827c9212b02 100644
> --- a/block/bfq-iosched.c
> +++ b/block/bfq-iosched.c
> @@ -5627,7 +5627,7 @@ static void bfq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
>  
>  	spin_lock_irq(&bfqd->lock);
>  	bfqq = bfq_init_rq(rq);
> -	if (!bfqq || at_head || blk_rq_is_passthrough(rq)) {
> +	if (!bfqq || at_head) {
>  		if (at_head)
>  			list_add(&rq->queuelist, &bfqd->dispatch);
>  		else
> diff --git a/block/mq-deadline.c b/block/mq-deadline.c
> index f3631a287466..04aded71ead2 100644
> --- a/block/mq-deadline.c
> +++ b/block/mq-deadline.c
> @@ -500,11 +500,8 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
>  
>  	trace_block_rq_insert(rq);
>  
> -	if (at_head || blk_rq_is_passthrough(rq)) {
> -		if (at_head)
> -			list_add(&rq->queuelist, &dd->dispatch);
> -		else
> -			list_add_tail(&rq->queuelist, &dd->dispatch);
> +	if (at_head) {
> +		list_add(&rq->queuelist, &dd->dispatch);
>  	} else {
>  		deadline_add_rq_rb(dd, rq);
>  
> -- 
> 2.30.2
> 

Looks fine:

Reviewed-by: Ming Lei <ming.lei@redhat.com>

Thanks,
Ming


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH 2/2] bfq/mq-deadline: remove redundant check for passthrough request
  2021-04-15  3:43 [RFC PATCH 2/2] bfq/mq-deadline: remove redundant check for passthrough request Lin Feng
  2021-04-16  2:14 ` Ming Lei
@ 2021-04-16 12:09 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2021-04-16 12:09 UTC (permalink / raw)
  To: Lin Feng, paolo.valente; +Cc: linux-block, ming.lei, linux-kernel

On 4/14/21 9:43 PM, Lin Feng wrote:
> Since commit 01e99aeca39796003 'blk-mq: insert passthrough request into
> hctx->dispatch directly', passthrough request should not appear in
> IO-scheduler any more, so blk_rq_is_passthrough checking in addon IO
> schedulers is redundant.
> 
> (Notes: this patch passes generic IO load test with hdds under SAS
> controller and hdds under AHCI controller but obviously not covers all.
> Not sure if passthrough request can still escape into IO scheduler from
> blk_mq_sched_insert_requests, which is used by blk_mq_flush_plug_list and
> has lots of indirect callers.)

Applied, with the bfq bits hand edited to apply for 5.13.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15  3:43 [RFC PATCH 2/2] bfq/mq-deadline: remove redundant check for passthrough request Lin Feng
2021-04-16  2:14 ` Ming Lei
2021-04-16 12:09 ` Jens Axboe

Linux-Block Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-block/0 linux-block/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-block linux-block/ https://lore.kernel.org/linux-block \
		linux-block@vger.kernel.org
	public-inbox-index linux-block

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-block


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git