Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp559055pxb; Fri, 28 Jan 2022 05:20:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJaEcSTldlh/DyBGPLRIY54ePQGP/M4QIKBqcGL5XGH48Qs0VCV5md7ETc9vwJ9q9yA2u6 X-Received: by 2002:a63:5157:: with SMTP id r23mr6644326pgl.196.1643376029551; Fri, 28 Jan 2022 05:20:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643376029; cv=none; d=google.com; s=arc-20160816; b=mKd0ogVRHDq99VV48ifF4zV/r4YJpdnW8WdteWDzkIwhsqPA1GtJK/B3IbdnpOULuh 8IS8Umg/ACiR0rbtJU1rBz65BvzQ/4U7O5fh8i7sHVgE9k045ZSfSR27C4tQRy3mKou6 cLFv1lm4tFjj8P4Bag3kQ5JGMhwG8kkjuXleLiyAAjXAbVFe1nX22FC5VTBNtliH2VvX WMhuHHgn1v99SdNCm7l+rpFQBbn3wUiDgEkPe634wmkKA0nrkSpeJbdvD+Xwq3xq3yXG b+jovsH0K8zekcnNNUWUYcbGSSkd1L7zAWInRO1LktGFxKVfSscXi7p0cguFhfahAaNV 3LPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=Ne/jFXVftIORN5xO4ovrttNELmxztmZyP5gO/6HLWHQ=; b=0DBgD15Hl7BzZjRT6nQffFUeJ0zmwoSLMwmcQtFpJLXVh7kNpd+AnyYw+SHDyiE2r7 RuXb/KRvOvK84aocK2ULlsxzxduvDZ8X7uKjY8LAV3x413Hffr0AX9vnzJ5/UOg7XbzY P14PmsraO6iVFvfxzYn17dNsFVsocgXD2SzB6itGEkH6I8KrCClT4o6YdJPEHw/8qR4d gobumaC238FoZaM8IrJQ1TQoFXUhCEJ5kKIBbcykW4m2w6kE814YrA2dVXGEoR0LvfXZ +HoERqPPJMwK+fnwpz80IXpbYBK00xqWBfbiRHKWyxoMMFDfqWm+MXSZMacyD3tfu74U Rl8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=s5c0jC5e; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l4si5939069plh.29.2022.01.28.05.20.17; Fri, 28 Jan 2022 05:20:29 -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=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=s5c0jC5e; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239022AbiA0SHB (ORCPT + 99 others); Thu, 27 Jan 2022 13:07:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238982AbiA0SHA (ORCPT ); Thu, 27 Jan 2022 13:07:00 -0500 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BD83C06173B for ; Thu, 27 Jan 2022 10:07:00 -0800 (PST) Received: by mail-io1-xd2e.google.com with SMTP id p63so3723586iod.11 for ; Thu, 27 Jan 2022 10:07:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Ne/jFXVftIORN5xO4ovrttNELmxztmZyP5gO/6HLWHQ=; b=s5c0jC5e6bKpWTieJBzBxuTlaTcifGLmV/bCDAxTK0t1rBEaSTZfKHb/LSP7HGmTRb g0+7VK6G3W4VHIyyfyJy9qPlvfHnS9Pbqao60eniVW+Tif29MG5rO81WmAgIW9Hd5uLE U8l+tvveukKDMsdlzhKnfieYC0u1QnUaH3WwRv/VQsaXQGBGrM9ucu0bIXjz2fz31E8O JNlNMFLrBXqgyWsLhER8fg77N7eujOlpvPZcEvvHNTRR5NmO+ocW/fuoZGKgnzshY5ky x0nHtuuWPz3T1Ete6dwzvWmwRP21If3AT3x6i8KRrBo1MmJpFOluCB17yR6sVFyuMgtH Jr5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Ne/jFXVftIORN5xO4ovrttNELmxztmZyP5gO/6HLWHQ=; b=zRKLDd3jBEvXiyJUiHAlMaJLjURtZGhBYNTouD7Lo2dWUFLh8SBxwYQOsDWEPfXAkQ GVf7I31rTussB9NntG9NNS9Tg8CAaazbPhUndqL4K5WkJTPhzeoNqLrvvWXpiU9KQ2to oBE1n4E2fsru4DYJFyNqyU0/o/l593+umj4qiWM+/ZT1TtAQXV4CTecVRIS00otbsbl8 kMTqs4vCQ2H2o27cvyUGZpZb2uCcvkPnNJ64yk8zLBIKxPXqUcOmBhoi29h0T7G0fJX4 px51b+bro+sgMvP6feZ0IhKT75MZtv0YJjX2oQhs5Qwji/As+ALyFdHYVmfPSjBvgqB9 kubA== X-Gm-Message-State: AOAM533iPm6LZonWutXUy0lG2jJotFGrUy76AP70uCuZsHoofwph09uS aQNLhVnv7N9tw2wKZzrbnh3Uz+crDIhQnA== X-Received: by 2002:a02:95e7:: with SMTP id b94mr2371314jai.106.1643306819442; Thu, 27 Jan 2022 10:06:59 -0800 (PST) Received: from [192.168.1.30] ([207.135.234.126]) by smtp.gmail.com with ESMTPSA id c3sm13126449iow.28.2022.01.27.10.06.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Jan 2022 10:06:59 -0800 (PST) Subject: Re: [PATCH -next V5] blk-mq: fix tag_get wait task can't be awakened To: Guenter Roeck , Laibin Qiu Cc: ming.lei@redhat.com, john.garry@huawei.com, martin.petersen@oracle.com, hare@suse.de, akpm@linux-foundation.org, bvanassche@acm.org, andriy.shevchenko@linux.intel.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220113025536.1479653-1-qiulaibin@huawei.com> <20220127013238.GA1478141@roeck-us.net> <30d998f5-15d5-c867-3c45-49aba1fb8fbc@roeck-us.net> From: Jens Axboe Message-ID: Date: Thu, 27 Jan 2022 11:06:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <30d998f5-15d5-c867-3c45-49aba1fb8fbc@roeck-us.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/27/22 11:04 AM, Guenter Roeck wrote: > On 1/27/22 09:28, Jens Axboe wrote: >> On 1/26/22 6:32 PM, Guenter Roeck wrote: >>> Hi, >>> >>> On Thu, Jan 13, 2022 at 10:55:36AM +0800, Laibin Qiu wrote: >>>> 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 >>> >>> I understand this problem has been reported already, but still: >>> >>> This patch causes a hang in several of my qemu emulations when >>> trying to boot from usb. Reverting it fixes the problem. Bisect log >>> is attached. >>> >>> Boot logs are available at >>> https://kerneltests.org/builders/qemu-arm-aspeed-master/builds/230/steps/qemubuildcommand/logs/stdio >>> but don't really show much: the affected tests simply hang until they >>> are aborted. >> >> This one got reported a few days ago, can you check if applying: >> >> https://git.kernel.dk/cgit/linux-block/commit/?h=block-5.17&id=10825410b956dc1ed8c5fbc8bbedaffdadde7f20 >> >> fixes it for you? >> > Yes, it does. Great, thanks for reporting/testing. -- Jens Axboe