Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4233552pxb; Tue, 25 Jan 2022 06:21:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2+uxkRAOhfrSCm8+mkOq+G09l6Jrs8BrexEXQPvL6QK2xmNEWfNqmYxa/nE8RE7Hgp14Q X-Received: by 2002:a17:90a:9908:: with SMTP id b8mr3655348pjp.125.1643120490196; Tue, 25 Jan 2022 06:21:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643120490; cv=none; d=google.com; s=arc-20160816; b=A8tfD8iIB0yRexMIzc/09vxTZl2IadsezhfFrixDYi3Ur3yhUyBvs6ea6lgpeuJVOH a9VdDIZV2bp4acRpNN7Z5kkJxZcV9NDvNgFPAbc1WpLz/PSMBSvz+CLSBBHey6t89ZVZ k7T+ia8ekTZ5j94Ql+217VycTJ2+KZJcFX1btZ9/9xTkrlAJX0xDUQ9OJQZZ0YAk111P RmVtzd7ws5FzfxzLoq/zQQpIlj1Tw8Ds1hG+Au7pKOybtf6IzD6WT9t/8ZOvlZ8z8msR yhHk5Znmh2/wQpLKDW0yKZquQ5l9a3xWQKfHy12UDbmfVaGdcVigjy+IpUymADANfVU8 EcPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=91J4/bV9gSNh+vLXfsz9JJoLD6ijGFEze+qnNxfGToY=; b=T4mFjZoDQSZ+lHFni9XBCFr3AVGMFVVIgb2My/HJL0hpVoR1W5FJ3SntgNrikNG4hw 9mVmg8+dhDQ1kRPoeqimFGdYvyiSuQTi1eHSvUxtOGs5kYyvf9fizyo2I58VEmz5o2Mk HDvoGxhSLBrm0yQGX/WO0FFHj2TbIBrv2ygAPCY1tFMILtUSHmO38RRj1QGx4bqX5QXo JVzssMM1SS9RYw9V3krZ9HtxPc4k/oYd8djjKYu9zqmVOL3wL8TMZ3yl+wMUYxx/miBl 3Q3gtqRmS1jNx2LUI5qG/gD8jKeeBRlXNofSOVy01TBMSLx6kWC52XFOGXuRjIsk8l/a f3Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HzfkXg5g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e62si6851722pgc.84.2022.01.25.06.21.17; Tue, 25 Jan 2022 06:21:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HzfkXg5g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1457700AbiAYJ3R (ORCPT + 99 others); Tue, 25 Jan 2022 04:29:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1455885AbiAYJHr (ORCPT ); Tue, 25 Jan 2022 04:07:47 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BBBCC0604ED; Tue, 25 Jan 2022 00:53:16 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EF0EF61367; Tue, 25 Jan 2022 08:53:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC95AC340E6; Tue, 25 Jan 2022 08:53:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643100795; bh=PXg7dW+YeL0p6xi+YdL/9GS4sqHwZFwbdh1xEkLal9A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HzfkXg5gctspyew5Ozty/tVC9EVPcSuGuC2aTrhV0g5YJbJMqseyBIn7u11jhJrUY nxX6y+rjzaPvkf3LNrO3Mt3d9OqiuA+9zpXXqABixZxDNYfxHALqQjIGdDQVrktOCf /sp/ZhWSMHvq6CIDx4EfO6iR1V3A+tHBrJmpvTj8= Date: Tue, 25 Jan 2022 09:53:12 +0100 From: Greg Kroah-Hartman To: John Garry Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Ming Lei , Laibin Qiu , Andy Shevchenko , Jens Axboe , alex_y_xu@yahoo.ca Subject: Re: [PATCH 5.16 1026/1039] blk-mq: fix tag_get wait task cant be awakened Message-ID: References: <20220124184125.121143506@linuxfoundation.org> <20220124184159.785093232@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 25, 2022 at 08:38:01AM +0000, John Garry wrote: > On 24/01/2022 18:46, Greg Kroah-Hartman wrote: > > From: Laibin Qiu > > > > commit 180dccb0dba4f5e84a4a70c1be1d34cbb6528b32 upstream. > > > > In case of shared tags, there might be more than one hctx which > > allocates from the same tags, and each hctx is limited to allocate at > > most: > > hctx_max_depth = max((bt->sb.depth + users - 1) / users, 4U); > > > > tag idle detection is lazy, and may be delayed for 30sec, so there > > could be just one real active hctx(queue) but all others are actually > > idle and still accounted as active because of the lazy idle detection. > > Then if wake_batch is > hctx_max_depth, driver tag allocation may wait > > forever on this real active hctx. > > > > Fix this by recalculating wake_batch when inc or dec active_queues. > > > > Fixes: 0d2602ca30e41 ("blk-mq: improve support for shared tags maps") > > Suggested-by: Ming Lei > > Suggested-by: John Garry > > Signed-off-by: Laibin Qiu > > Reviewed-by: Andy Shevchenko > > Link:https://lore.kernel.org/r/20220113025536.1479653-1-qiulaibin@huawei.com > > Signed-off-by: Jens Axboe > > Signed-off-by: Greg Kroah-Hartman > > JFYI, Somebody reported a hang with this commit: > https://lore.kernel.org/linux-block/78cafe94-a787-e006-8851-69906f0c2128@huawei.com/T/#t Thanks for the report, I'll go drop this patch now. greg k-h