linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yu Kuai <yukuai1@huaweicloud.com>
To: Jan Kara <jack@suse.cz>, Yu Kuai <yukuai1@huaweicloud.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	paolo.valente@linaro.org, axboe@kernel.dk,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	yi.zhang@huawei.com, "yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH v3 3/5] block, bfq: don't disable wbt if CONFIG_BFQ_GROUP_IOSCHED is disabled
Date: Fri, 23 Sep 2022 19:32:46 +0800	[thread overview]
Message-ID: <9edbfe1a-b4ba-7967-4287-1610415f6449@huaweicloud.com> (raw)
In-Reply-To: <20220923110354.czvzm6rjm7mtqyh3@quack3>

Hi, Jan!

在 2022/09/23 19:03, Jan Kara 写道:
> Hi Kuai!
> 
> On Fri 23-09-22 18:23:03, Yu Kuai wrote:
>> 在 2022/09/23 18:06, Jan Kara 写道:
>>> On Fri 23-09-22 17:50:49, Yu Kuai wrote:
>>>> Hi, Christoph
>>>>
>>>> 在 2022/09/23 16:56, Christoph Hellwig 写道:
>>>>> On Thu, Sep 22, 2022 at 07:35:56PM +0800, Yu Kuai wrote:
>>>>>> wbt and bfq should work just fine if CONFIG_BFQ_GROUP_IOSCHED is disabled.
>>>>>
>>>>> Umm, wouldn't this be something decided at runtime, that is not
>>>>> if CONFIG_BFQ_GROUP_IOSCHED is enable/disable in the kernel build
>>>>> if the hierarchical cgroup based scheduling is actually used for a
>>>>> given device?
>>>>> .
>>>>>
>>>>
>>>> That's a good point,
>>>>
>>>> Before this patch wbt is simply disabled if elevator is bfq.
>>>>
>>>> With this patch, if elevator is bfq while bfq doesn't throttle
>>>> any IO yet, wbt still is disabled unnecessarily.
>>>
>>> It is not really disabled unnecessarily. Have you actually tested the
>>> performance of the combination? I did once and the results were just
>>> horrible (which is I made BFQ just disable wbt by default). The problem is
>>> that blk-wbt assumes certain model of underlying storage stack and hardware
>>> behavior and BFQ just does not fit in that model. For example BFQ wants to
>>> see as many requests as possible so that it can heavily reorder them,
>>> estimate think times of applications, etc. On the other hand blk-wbt
>>> assumes that if request latency gets higher, it means there is too much IO
>>> going on and we need to allow less of "lower priority" IO types to be
>>> submitted. These two go directly against one another and I was easily
>>> observing blk-wbt spiraling down to allowing only very small number of
>>> requests submitted while BFQ was idling waiting for more IO from the
>>> process that was currently scheduled.
>>>
>>
>> Thanks for your explanation, I understand that bfq and wbt should not
>> work together.
>>
>> However, I wonder if CONFIG_BFQ_GROUP_IOSCHED is disabled, or service
>> guarantee is not needed, does the above phenomenon still exist? I find
>> it hard to understand... Perhaps I need to do some test.
> 
> Well, BFQ implements for example idling on sync IO queues which is one of
> the features that upsets blk-wbt. That does not depend on
> CONFIG_BFQ_GROUP_IOSCHED in any way. Also generally the idea that BFQ
> assigns storage *time slots* to different processes and IO from other
> processes is just queued at those times increases IO completion
> latency (for IOs of processes that are not currently scheduled) and this
> tends to confuse blk-wbt.
> 
I see it now, thanks a lot for your expiations, that really helps a lot.

I misunderstand about the how the bfq works. I'll remove this patch in
next version.

Thanks,
Kuai

> 								Honza
> 


  reply	other threads:[~2022-09-23 11:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 11:35 [PATCH v3 0/5] blk-wbt: simple improvment to enable wbt correctly Yu Kuai
2022-09-22 11:35 ` [PATCH v3 1/5] wbt: don't show valid wbt_lat_usec in sysfs while wbt is disabled Yu Kuai
2022-09-26  9:44   ` Jan Kara
2022-09-26 10:25     ` Yu Kuai
2022-09-26 11:47       ` Jan Kara
2022-09-26 13:01         ` Yu Kuai
2022-09-22 11:35 ` [PATCH v3 2/5] elevator: add new field flags in struct elevator_queue Yu Kuai
2022-09-22 11:35 ` [PATCH v3 3/5] block, bfq: don't disable wbt if CONFIG_BFQ_GROUP_IOSCHED is disabled Yu Kuai
2022-09-23  8:56   ` Christoph Hellwig
2022-09-23  9:50     ` Yu Kuai
2022-09-23 10:06       ` Jan Kara
2022-09-23 10:23         ` Yu Kuai
2022-09-23 11:03           ` Jan Kara
2022-09-23 11:32             ` Yu Kuai [this message]
2022-09-26 13:00             ` Yu Kuai
2022-09-26 14:22               ` Jan Kara
2022-09-27  1:02                 ` Yu Kuai
2022-09-27 16:14                   ` Paolo Valente
2022-09-28  3:30                     ` Yu Kuai
2022-09-22 11:35 ` [PATCH v3 4/5] blk-wbt: don't enable throttling if default elevator is bfq Yu Kuai
2022-09-22 11:35 ` [PATCH v3 5/5] elevator: remove redundant code in elv_unregister_queue() Yu Kuai
2022-09-23  3:37   ` Eric Biggers
2022-09-23  8:53   ` Christoph Hellwig

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=9edbfe1a-b4ba-7967-4287-1610415f6449@huaweicloud.com \
    --to=yukuai1@huaweicloud.com \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paolo.valente@linaro.org \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai3@huawei.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).