All of lore.kernel.org
 help / color / mirror / Atom feed
From: brookxu <brookxu.cn@gmail.com>
To: Ming Lei <ming.lei@redhat.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 14:50:54 +0800	[thread overview]
Message-ID: <4fc7ac4a-5945-a3c4-c3fd-2ad10673e906@gmail.com> (raw)
In-Reply-To: <Yde5EK12LoBq1wHw@T590>



Ming Lei wrote on 2022/1/7 11:52:
> 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().

This patch should still be necessary for those devices whose IO needs to go
through __submit_bio_fops(). If the IO is split after submit_bio_checks(), 
the cloned IO will be marked with BIO_THROTTLED and will not be charged again
when resubmitted.
> 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:

Right.

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

  reply	other threads:[~2022-01-07  6:51 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
2022-01-07  6:50     ` brookxu [this message]
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=4fc7ac4a-5945-a3c4-c3fd-2ad10673e906@gmail.com \
    --to=brookxu.cn@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=brookxu@tencent.com \
    --cc=lining2020x@163.com \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.