From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH] blk-wbt: Avoid lock contention and thundering herd issue in wbt_wait To: =?UTF-8?Q?Holger_Hoffst=c3=a4tte?= Cc: linux-block@vger.kernel.org References: <6bab69c9-b787-b12f-7738-72e05bf74444@kernel.dk> <72f90be2-0b63-d3a0-e953-da9232f44d5b@kernel.dk> <761bb0ab416649b8bf3bac1706124456@EX13D13UWB002.ant.amazon.com> <7f6c399d-bda1-0bbf-4ea1-07fc510ed1eb@kernel.dk> <3498fbfb-e9f3-7606-1fc3-904a0e61ff57@kernel.dk> <168d80ac73a44a6f9242c47c164778fc@EX13D13UWB002.ant.amazon.com> <20180820224241.GA72523@8c8590bceeee.ant.amazon.com> <70e2063a-53fa-2475-eed9-07db277c8c0d@kernel.dk> <20180822040126.GA18736@kaos-source-ops-60001.pdx1.amazon.com> <76ecb022-f167-67eb-8801-111fc209bbaa@kernel.dk> <834649ab-62d6-bc7f-ec60-6c1654ea3f26@applied-asynchrony.com> <1c40bce3-24fc-f473-5263-a04a677a3f69@applied-asynchrony.com> <727c76cc-3578-2272-eaaf-834213d929e1@kernel.dk> From: Jens Axboe Message-ID: <6f0e6f3d-060b-1dd7-b91e-5e9df3f485cb@kernel.dk> Date: Wed, 22 Aug 2018 13:46:40 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 List-ID: On 8/22/18 1:37 PM, Holger Hoffstätte wrote: > On 08/22/18 21:17, Jens Axboe wrote: >>> 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! >> 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. -- Jens Axboe