public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: brookxu <brookxu.cn@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, lining2020x@163.com,
	Tejun Heo <tj@kernel.org>, Chunguang Xu <brookxu@tencent.com>
Subject: Re: [PATCH] block: throttle: charge io re-submission for iops limit
Date: Fri, 7 Jan 2022 11:52:48 +0800	[thread overview]
Message-ID: <Yde5EK12LoBq1wHw@T590> (raw)
In-Reply-To: <6eac325f-3d37-92b9-ca4a-f419a17345a1@gmail.com>

On Thu, Jan 06, 2022 at 03:46:54PM +0800, brookxu wrote:
> Hi Ming:
> 
> I think it may be due to other reasons, I test this patch seems work fine,
> Can you verify it in your environment?

Your patch can't cover the issue Ning Li reported.

> 
> 
> From 2c7305042e71d0f53ca50a8a3f2eebe6a2dcdb86 Mon Sep 17 00:00:00 2001
> From: Chunguang Xu <brookxu@tencent.com>
> Date: Thu, 6 Jan 2022 15:18:50 +0800
> Subject: [PATCH] blk-throtl: avoid double charge of bio IOPS due to split
> 
> After commit 900e08075202("block: move queue enter logic into
> blk_mq_submit_bio()"), submit_bio_checks() is moved from the
> entrance of the IO stack to the specific submit_bio() entrance.
> Therefore, the IO may be splited before entering blk-throtl, so
> we need to check whether the BIO is throttled, and only need
> to update the io_split_cnt for the throttled bio to avoid
> double charge.

Actually since commit 900e08075202, your commit 4f1e9630afe6
("blk-throtl: optimize IOPS throttle for large IO scenarios") doesn't
need any more, because split bio is always sent to submit_bio_checks().

But I don't think that way is reasonable, especially precise driver tag
and request is consumed by each throttling, so the following patch is posted:

https://lore.kernel.org/linux-block/20220104134223.590803-1-ming.lei@redhat.com/T/#u


Thanks,
Ming


  reply	other threads:[~2022-01-07  3:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-30  3:45 [PATCH] block: throttle: charge io re-submission for iops limit Ming Lei
2022-01-06  2:41 ` Ming Lei
2022-01-06  7:46 ` brookxu
2022-01-07  3:52   ` Ming Lei [this message]
2022-01-07  6:50     ` brookxu
2022-01-07  7:35       ` brookxu

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=Yde5EK12LoBq1wHw@T590 \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=brookxu.cn@gmail.com \
    --cc=brookxu@tencent.com \
    --cc=lining2020x@163.com \
    --cc=linux-block@vger.kernel.org \
    --cc=tj@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