From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D359BD2CDE4 for ; Thu, 4 Dec 2025 23:23:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=l83Pny9GYXrwKC6pNJtZuDPNUiGnu/Vd9NOnnwLpAL8=; b=Kn7oQNlaqh9HIuWSlQyxEY/0p2 13x9loRsnt4/mfwHkvz+PpJ5933fRN4Fd+evPbYPf6/h2TfdXoVJJ+UrWV7vxfBtpLcC2wlEEv4mA GkAu2jLATqlyh2cnPVGAvtPv3N4HbmsgZ3T4ONVB1umEyYbm5FIsNBsCxA1O2I5Pcc1/BS2iBUo73 xEACIWF/nAvqzz4+ynFDhFSWgLZwbt4QHtxT1/F0jYeAR/6O0yVsy40EUWgQLHLLbVqUG3JMa5QzJ zSHAda9yJcVKfAJF2YRdFLCM4UW0jRN/gj1HLwfo+reZZqsRfPZW6lQuxe1bA1fb7sg94uGW3XvPE dOrAH3Xw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vRIfE-00000008lvu-0Iph; Thu, 04 Dec 2025 23:23:08 +0000 Received: from 011.lax.mailroute.net ([199.89.1.14]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vRIfB-00000008lvR-0009 for linux-nvme@lists.infradead.org; Thu, 04 Dec 2025 23:23:06 +0000 Received: from localhost (localhost [127.0.0.1]) by 011.lax.mailroute.net (Postfix) with ESMTP id 4dMrCX3ByMz1XLksh; Thu, 4 Dec 2025 23:23:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject :user-agent:mime-version:date:date:message-id:received:received; s=mr01; t=1764890581; x=1767482582; bh=l83Pny9GYXrwKC6pNJtZuDPN UiGnu/Vd9NOnnwLpAL8=; b=sH0eaJo3AYqTeDnqXPUzIam0eBKY7WvIX7EjIbq2 kAVb59TQmTFQhGmXI1W9EaEHeFGFPciarIMZtDfDAp+fNfjtePe+1K+VEaPfefs5 bDVHA9zqabMcyKk5nruNAjh4FPnh3WkfGJec36KwcENjvbxozhyspcc3ZE7qCo4W jLW9yw4wjxne1ZyoXZ2uQSSfHdA04v9K12A4J+f7jXcnZ22Up+W8gNpps0EXErsx X8n+vDL46aSAOOWXZifiHJmGEFQ8Qeqiz/TdxEn7Ma8zFMkTKtKppnnz6AuXHuP+ xWe9lslBCDBCbYOmQTRAut0YGCDcf/tgvRHj5KxF3s/oSw== X-Virus-Scanned: by MailRoute Received: from 011.lax.mailroute.net ([127.0.0.1]) by localhost (011.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id pzA6pr0CsDbO; Thu, 4 Dec 2025 23:23:01 +0000 (UTC) Received: from [10.22.10.72] (syn-098-153-230-237.biz.spectrum.com [98.153.230.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 011.lax.mailroute.net (Postfix) with ESMTPSA id 4dMrCJ6QBtz1XM0ty; Thu, 4 Dec 2025 23:22:52 +0000 (UTC) Message-ID: <201a7e9e-4782-4f71-a73b-9d58a51ee8ec@acm.org> Date: Thu, 4 Dec 2025 13:22:49 -1000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/1] block: Use RCU in blk_mq_[un]quiesce_tagset() instead of set->tag_list_lock To: Keith Busch Cc: Mohamed Khalfella , Chaitanya Kulkarni , Christoph Hellwig , Jens Axboe , Sagi Grimberg , Casey Chen , Yuanyuan Zhong , Hannes Reinecke , Ming Lei , Waiman Long , Hillf Danton , linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <20251204181212.1484066-1-mkhalfella@purestorage.com> <20251204181212.1484066-2-mkhalfella@purestorage.com> <5450d3fa-3f00-40ae-ac95-1f08886de3b6@acm.org> <20251204184243.GZ337106-mkhalfella@purestorage.com> <71e9950f-ace7-4570-a604-ceca347eea20@acm.org> <20251204191555.GB337106-mkhalfella@purestorage.com> <77c5c064-2539-4ad9-8657-8a1db487522f@acm.org> <20251204195759.GC337106-mkhalfella@purestorage.com> <6994b9a7-ef2b-42f3-9e72-7489a56f8f8e@acm.org> Content-Language: en-US From: Bart Van Assche In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251204_152305_096223_DFA49B2C X-CRM114-Status: GOOD ( 15.70 ) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org On 12/4/25 11:26 AM, Keith Busch wrote: > On Thu, Dec 04, 2025 at 10:24:03AM -1000, Bart Van Assche wrote:>> Hence, the deadlock can be >> solved by removing the blk_mq_quiesce_tagset() call from nvme_timeout() >> and by failing I/O from inside nvme_timeout(). If nvme_timeout() fails >> I/O and does not call blk_mq_quiesce_tagset() then the >> blk_mq_freeze_queue_wait() call will finish instead of triggering a >> deadlock. However, I do not know whether this proposal seems acceptable >> to the NVMe maintainers. > > You periodically make this suggestion, but there's never a reason > offered to introduce yet another work queue for the driver to > synchronize with at various points. The whole point of making blk-mq > timeout handler in a work queue (it used to be a timer) was so that we > could do blocking actions like this. Hi Keith, The blk_mq_quiesce_tagset() call from the NVMe timeout handler is unfortunate because it triggers a deadlock with blk_mq_update_tag_set_shared(). I proposed to modify the NVMe driver because I think that's a better approach than introducing a new synchronize_rcu() call in the block layer core. However, there may be better approaches for fixing this in the NVMe driver than what I proposed so far. Thanks, Bart.