From: Jens Axboe <axboe@kernel.dk>
To: "Holger Hoffstätte" <holger@applied-asynchrony.com>
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH] blk-wbt: Avoid lock contention and thundering herd issue in wbt_wait
Date: Wed, 22 Aug 2018 13:17:03 -0600 [thread overview]
Message-ID: <727c76cc-3578-2272-eaaf-834213d929e1@kernel.dk> (raw)
In-Reply-To: <1c40bce3-24fc-f473-5263-a04a677a3f69@applied-asynchrony.com>
On 8/22/18 1:12 PM, Holger Hoffstätte wrote:
> On 08/22/18 19:28, Jens Axboe wrote:
>> On 8/22/18 8:27 AM, Jens Axboe wrote:
>>> On 8/22/18 6:54 AM, Holger Hoffstätte wrote:
>>>> On 08/22/18 06:10, Jens Axboe wrote:
>>>>> [...]
>>>>> If you have time, please look at the 3 patches I posted earlier today.
>>>>> Those are for mainline, so should be OK :-)
>>>>
>>>> I'm just playing along at home but with those 3 I get repeatable
>>>> hangs & writeback not starting at all, but curiously *only* on my btrfs
>>>> device; for inexplicable reasons some other devices with ext4/xfs flush
>>>> properly. Yes, that surprised me too, but it's repeatable.
>>>> Now this may or may not have something to do with some of my in-testing
>>>> patches for btrfs itself, but if I remove those 3 wbt fixes, everything
>>>> is golden again. Not eager to repeat since it hangs sync & requires a
>>>> hard reboot.. :(
>>>> Just thought you'd like to know.
>>>
>>> Thanks, that's very useful info! I'll see if I can reproduce that.
>>
>> Any chance you can try with and see which patch is causing the issue?
>> I can't reproduce it here, seems solid.
>>
>> Either that, or a reproducer would be great...
>
> It's a hacked up custom tree but the following things have emerged so far:
>
> - it's not btrfs.
>
> - it also happens with ext4.
>
> - I first suspected bfq on a nonrotational device disabling WBT by default,
> but using deadline didn't help either. Can't even mkfs.ext4.
>
> - I suspect - but do not know - that using xfs everywhere else is the
> reason I got lucky, because xfs. :D
>
> - it immediately happens with only the first patch
> ("move disable check into get_limit()")
>
> So the obvious suspect is the new return of UINT_MAX from get_limit() to
> __wbt_wait(). I first suspected that I mispatched something, but it's all
> like in mainline or your tree. Even the recently moved-around atomic loop
> inside rq_wait_inc_below() is 1:1 the same and looks like it should.
> Now building mainline and see where that leads me.
I wonder if it's a signedness thing? Can you try and see if using INT_MAX
instead changes anything?
--
Jens Axboe
next prev parent reply other threads:[~2018-08-22 19:17 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 21:34 [PATCH] blk-wbt: Avoid lock contention and thundering herd issue in wbt_wait Anchal Agarwal
2018-07-31 22:02 ` Anchal Agarwal
2018-08-01 15:14 ` Jens Axboe
2018-08-01 17:06 ` Anchal Agarwal
2018-08-01 22:09 ` Jens Axboe
2018-08-07 14:29 ` Jens Axboe
2018-08-07 20:12 ` Anchal Agarwal
2018-08-07 20:39 ` Jens Axboe
2018-08-07 21:12 ` Anchal Agarwal
2018-08-07 21:19 ` Jens Axboe
2018-08-07 22:06 ` Anchal Agarwal
2018-08-20 16:36 ` Jens Axboe
2018-08-20 17:34 ` van der Linden, Frank
2018-08-20 19:08 ` Jens Axboe
2018-08-20 19:29 ` Jens Axboe
2018-08-20 20:19 ` van der Linden, Frank
2018-08-20 20:20 ` Jens Axboe
2018-08-20 22:42 ` Balbir Singh
2018-08-21 2:58 ` Jens Axboe
2018-08-22 3:20 ` Jens Axboe
2018-08-22 4:01 ` Anchal Agarwal
2018-08-22 4:10 ` Jens Axboe
2018-08-22 12:54 ` Holger Hoffstätte
2018-08-22 14:27 ` Jens Axboe
2018-08-22 16:42 ` van der Linden, Frank
2018-08-22 17:30 ` Jens Axboe
2018-08-22 20:26 ` Anchal Agarwal
2018-08-22 21:05 ` Jens Axboe
2018-08-22 17:28 ` Jens Axboe
2018-08-22 19:12 ` Holger Hoffstätte
2018-08-22 19:17 ` Jens Axboe [this message]
2018-08-22 19:37 ` Holger Hoffstätte
2018-08-22 19:46 ` Jens Axboe
2018-08-22 19:58 ` Holger Hoffstätte
2018-08-07 21:28 ` Matt Wilson
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=727c76cc-3578-2272-eaaf-834213d929e1@kernel.dk \
--to=axboe@kernel.dk \
--cc=holger@applied-asynchrony.com \
--cc=linux-block@vger.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