Re: [PATCH] blk-wbt: Avoid lock contention and thundering herd issue in wbt_wait
From: Holger Hoffstätte <hidden>
Date: 2018-08-22 19:58:49
On 08/22/18 21:46, Jens Axboe wrote:
On 8/22/18 1:37 PM, Holger Hoffstätte wrote:quoted
On 08/22/18 21:17, Jens Axboe wrote:quoted
quoted
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.So mainline + your tree's last 4 patches works fine, as suspected. It's all me, as usual.That's a relief!quoted
quoted
I wonder if it's a signedness thing? Can you try and see if using INT_MAX instead changes anything?Beat me to it while I was rebooting ;-) Exactly what I also found a minute ago: $diff -rup linux-4.18.4/block/blk-rq-qos.c linux/block/blk-rq-qos.c .. -bool rq_wait_inc_below(struct rq_wait *rq_wait, int limit) +bool rq_wait_inc_below(struct rq_wait *rq_wait, unsigned int limit) .. Moo! Patching now.At least we have an explanation for why it didn't work.
Luckily I can still read and 22f17952c7 is conveniently called "blk-rq-qos: make depth comparisons unsigned"! Needless to say with that thrown into the mix all is good again. Sorry for the confusion & thanks for your patience. cheers! Holger