Received: by 10.192.165.148 with SMTP id m20csp4943962imm; Tue, 8 May 2018 18:10:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqtdIOppINGrY7RqsTJRMPV4CTCrQ0Mff5FhBFRjXuqoY9NFwUO3ApWl4cnCQ064kXX/tqy X-Received: by 2002:a17:902:108a:: with SMTP id c10-v6mr44757151pla.111.1525828247187; Tue, 08 May 2018 18:10:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525828247; cv=none; d=google.com; s=arc-20160816; b=Ftwiq31Xp3yuyxI5CFy16bOLVvt3xJMiWEUssjd+LZ5Jbsch1Dd5WQb5lMpfHpO3ah YSpZ+rMK2rZ5K1hvkR5d5/PFFjMBAM8GsHdgrSEWuKHxj6hvAGlaqv8TYWLJF89oJtMB uQLL6ujxZWAmmdR8ZaSOkMpMWA/alSx3lqrvgPMYE0K6Yzn0NOO9SgTFTtzK4Dn0H1Wh qaXfNRvPVBKibx9r9aRHPuVgw6CfxaO19QN8TCyqU46QuzmbHYzafzSx49bGunX4VsKE 3bvwJI3Si7r/Dk5L3Rqa+mM2gwfPRbGkFDHYdIg106/YO64CcN37oOjUSYpjhmE5H6+Q 1bVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature :arc-authentication-results; bh=Nnv13bQb6dprmzrX/GR4E+Y9UJD4Y53bRjphOwcT2TU=; b=kQU1pQrYeR4RHKPzu2OCOkkhhjFjSRgXRW3j52GvpuTSgmm1zsKHy/IDfcpr5lhLEk brv9X7fmksY8ZyFyDrBDvrrgXqI+hftdFpU4M/YZ5GWAe7yVkT+RIkQY9OuAztEEv5oL 0joqtVzyyO5Qj8GyOuTI1/5e8UhQe8ZqRvR4vC4LWUu8FyVor1qJmLNrvkMrs2m6+nXj LkRM5ENf9U7oQugLkJM/UBq9hfgvFvfVnXis+MKjIQ6Pe+DsldWALmZN0iveYNsJcuaD Z7wHy402uG+mO3l3Jp3ELMSw/BFhjca6m1S00Wzg076hwMy+ww4EyN04PYA8HGeF+XLQ yozQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=R4xk1F6P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c9-v6si23829578plz.501.2018.05.08.18.10.32; Tue, 08 May 2018 18:10:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=R4xk1F6P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933361AbeEIBJL (ORCPT + 99 others); Tue, 8 May 2018 21:09:11 -0400 Received: from mail-pg0-f42.google.com ([74.125.83.42]:44147 "EHLO mail-pg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932988AbeEIBJI (ORCPT ); Tue, 8 May 2018 21:09:08 -0400 Received: by mail-pg0-f42.google.com with SMTP id x145-v6so1641837pgx.11 for ; Tue, 08 May 2018 18:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Nnv13bQb6dprmzrX/GR4E+Y9UJD4Y53bRjphOwcT2TU=; b=R4xk1F6PVfnEoIAadEK8EKaE19S19fE7YsFyJmc3K+mTEqf8mP6fo88rbZNDpKWmyf yrGbL+0kdAtrl9/GgY2+4f5rRs81qbIQiQn094oiWpRrknh+IvOmASeqauZ1av9CMiDB IZ2Kkv/ZFJATHKDjbX7cmIcIDlWo9POo1ijlORLkLds8W1H04218iFlBNC+0UKV7GaEl ++fYfDRcmY2wf/qPhFXA1P0Edqco5/udb6fYoKjYNTxpqqC0QH7M0AgYFnvLkFEDpQAQ v6oO2q0lKsHK+tmwFOcpZi0jsFvP4lpnKwCdYzPmrkrcMl79TPOg3JmXyjSEaHO7XVzA gA7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Nnv13bQb6dprmzrX/GR4E+Y9UJD4Y53bRjphOwcT2TU=; b=gWGkzo0ECRio6z8Tr5TsvnsQCelG4nUAh+32n+kc1xlESiw7LPekW8dySkppdpjzyJ gTj0N7dJrgXspaNkKQ+/3sO88zqcosbVKFXftQWhGzuHss3l5eEQqf86nlYx1PPCDlmm +y8RaaTprjMRSK0DpkXOc4gADzg3tvUhFpCEE2zxcU+kax0R6kmt/c2pLY154KI/XxNy zpX9+hgtUCHQGoBirMelFdyz1iPpz9XUZZVNzqfNhbeA2U5V27b+y6sordoy9BmiIPU9 83JVJCwAv2hjlcGY/J6NGvVucw+Lq3ISZf99rEvlAv3KuUTIcQbilvG37Ixm7pimfTZh JffQ== X-Gm-Message-State: ALQs6tBE1vwSDBMUWWina9zcNh6/pl9pmTZI/sL2X5CXY19EKraga0sf ztV8spFhE5saQO16sVYVdo0cWQ== X-Received: by 10.98.172.20 with SMTP id v20mr42729825pfe.101.1525828148157; Tue, 08 May 2018 18:09:08 -0700 (PDT) Received: from ?IPv6:2600:380:6c6f:431e:795f:83b7:c122:323c? ([2600:380:6c6f:431e:795f:83b7:c122:323c]) by smtp.gmail.com with ESMTPSA id u86sm58590131pfg.71.2018.05.08.18.09.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 May 2018 18:09:06 -0700 (PDT) Subject: Re: bug in tag handling in blk-mq? From: Jens Axboe To: Mike Galbraith , Paolo Valente Cc: Christoph Hellwig , linux-block , Ulf Hansson , LKML , Linus Walleij , Oleksandr Natalenko 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> Message-ID: <57952405-bdeb-f4e4-1aef-a7c0a8a68674@kernel.dk> Date: Tue, 8 May 2018 19:09:04 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-8859-15 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/8/18 3:19 PM, Jens Axboe wrote: > On 5/8/18 2:37 PM, Jens Axboe wrote: >> On 5/8/18 10:42 AM, Mike Galbraith wrote: >>> On Tue, 2018-05-08 at 08:55 -0600, Jens Axboe wrote: >>>> >>>> All the block debug files are empty... >>> >>> Sigh. Take 2, this time cat debug files, having turned block tracing >>> off before doing anything else (so trace bits in dmesg.txt should end >>> AT the stall). >> >> OK, that's better. What I see from the traces: >> >> - You have regular IO and some non-fs IO (from scsi_execute()). This mix >> may be key. >> >> - sdd has nothing pending, yet has 6 active waitqueues. >> >> I'm going to see if I can reproduce this. Paolo, what kind of attempts >> to reproduce this have you done? > > No luck so far. Out of the patches you referenced, I can only find the > shallow depth change, since that's in the parent of this email. Can > you send those as well? > > Perhaps also expand a bit on exactly what you are running. File system, > mount options, etc. 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. 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, -- Jens Axboe