From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755983AbeEIFGc (ORCPT ); Wed, 9 May 2018 01:06:32 -0400 Received: from mail-wr0-f181.google.com ([209.85.128.181]:35524 "EHLO mail-wr0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753226AbeEIFGa (ORCPT ); Wed, 9 May 2018 01:06:30 -0400 X-Google-Smtp-Source: AB8JxZraxATAE35ofiKjyFOFBDrG5cuEJXQ0/X9e/w1dgg3QyWH+hfnukVCUYTHGztt3UsGtvAP0IQ== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: bug in tag handling in blk-mq? From: Paolo Valente In-Reply-To: <1525839089.15732.1.camel@gmx.de> Date: Wed, 9 May 2018 07:06:31 +0200 Cc: Jens Axboe , Christoph Hellwig , linux-block , Ulf Hansson , LKML , Linus Walleij , Oleksandr Natalenko Message-Id: <511C7624-6089-44E2-840A-E2657141AD88@linaro.org> References: <999DF2B3-4EE8-4BDF-89C5-EB0C2D8BF69E@linaro.org> <7760d23b-7a4c-a645-1c7a-da7569bb44dc@kernel.dk> <84145CD7-B917-4B32-8A5C-310C1910DB71@linaro.org> <1525755090.24338.1.camel@gmx.de> <1525768632.5208.4.camel@gmx.de> <1525797766.5204.2.camel@gmx.de> <3692ce7d-a767-72e6-65ae-6178b6c2e7d8@kernel.dk> <57952405-bdeb-f4e4-1aef-a7c0a8a68674@kernel.dk> <1525839089.15732.1.camel@gmx.de> To: Mike Galbraith X-Mailer: Apple Mail (2.3445.6.18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id w4956Yhe010343 > Il giorno 09 mag 2018, alle ore 06:11, Mike Galbraith ha scritto: > > On Tue, 2018-05-08 at 19:09 -0600, Jens Axboe wrote: >> >> Alright, I managed to reproduce it. What I think is happening is that >> BFQ is limiting the inflight case to something less than the wake >> batch for sbitmap, which can lead to stalls. I don't have time to test >> this tonight, but perhaps you can give it a go when you are back at it. >> If not, I'll try tomorrow morning. >> >> If this is the issue, I can turn it into a real patch. This is just to >> confirm that the issue goes away with the below. > > Confirmed. Impressive high speed bug stomping. > Great! It's a real relief that this ghost is gone. Thank you both, Paolo >> diff --git a/lib/sbitmap.c b/lib/sbitmap.c >> index e6a9c06ec70c..94ced15b6428 100644 >> --- a/lib/sbitmap.c >> +++ b/lib/sbitmap.c >> @@ -272,6 +272,7 @@ EXPORT_SYMBOL_GPL(sbitmap_bitmap_show); >> >> static unsigned int sbq_calc_wake_batch(unsigned int depth) >> { >> +#if 0 >> unsigned int wake_batch; >> >> /* >> @@ -284,6 +285,9 @@ static unsigned int sbq_calc_wake_batch(unsigned int depth) >> wake_batch = max(1U, depth / SBQ_WAIT_QUEUES); >> >> return wake_batch; >> +#else >> + return 1; >> +#endif >> } >> >> int sbitmap_queue_init_node(struct sbitmap_queue *sbq, unsigned int depth, >>