Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp439305lqi; Thu, 7 Mar 2024 01:36:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWpcxU0FQH79VoXtk60F21YDpWsVEGqZp1XbTmQQiLEQEd2tKe8UNS6anYyF/Xj3uVZhvYaH9dqma+Uwa4nvbRh9/cVKJhgPsjCI9N9oA== X-Google-Smtp-Source: AGHT+IHTUfCr3V4vXv2wtEV03l3iN5drxt1Nw3t3P9pOEvqzXoQL0vcOgPEq2PezB4wGl6Gorab2 X-Received: by 2002:ac8:5bc5:0:b0:42e:f751:d15c with SMTP id b5-20020ac85bc5000000b0042ef751d15cmr8579704qtb.54.1709804197683; Thu, 07 Mar 2024 01:36:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709804197; cv=pass; d=google.com; s=arc-20160816; b=B1lmklarPeXV+Mz1WyLv31qU9yImHfOBJKeD6xQzn3A+CXBqeHSU9cfWYa6nc0P7lM 9Luc90RrgMjyaDEumTLCynb/WycItdkF/y3BM623ggHHuHWzQJqGUbXIJZsi/boBlgVC 5y5ZExSrZ7O6MroxGEStO9zpFEaWbBe+SJ6nnciE3Qf5vX0OFCmO+RWZQCYwDr82si8d nkDMzX24zLttarbc3stxjvOsUosAFInHaTo4jRKLclAjkYforBlvw3ypNf1wGHAskPsJ RtXmV5X/5AVRBCXk0YzHFgNn5nPRZNoMBPkqm1ykEMNYA6vXqUvNENOdOoIfLkhfH+3K RiDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=P5xG7fHkgrGR5tgOHafwG7T4K3Ym7sMnppLoHfjyBVs=; fh=3Mah3V9jj9zC9/ZMsga2ktPJ/NlE26z2DzlBSFiXoYQ=; b=vqOuArBDQNGNLWkQERLt1C4kk39GyeATgFAh9AxZBwfF9HNayFS9AE9YHbV40WPIuX q9DPUfbIHXUF+AlNl/KaWmuzrcuBH+Ggfd/uIRzFTVi7QOIyGhRCq1ayyJB0ZXXcpeln EOw5epWmx/A7bUEOS/hgVexpBe7zl21F3uyuz7nl/6h4epNSSle14CMVhIQbGQXQSIFw qbYGmmNyiI+nxi8oL3XKph/ERjGrGsnz9v9U3s6wLxOBWSOeIcNlpUr09xlOA5F6IY3X taHopuRyx0LXplRGOz2R2hJplRjvJ4Fq4EA70zVXfGGg39BvPnK/wgewFGmXBVbeYCCc trvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-95231-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95231-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y17-20020a05622a121100b0042eed95bd9bsi9608977qtx.278.2024.03.07.01.36.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 01:36:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95231-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-95231-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95231-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5E2F91C2131A for ; Thu, 7 Mar 2024 09:36:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 28A6583CD8; Thu, 7 Mar 2024 09:36:19 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14F0883A03 for ; Thu, 7 Mar 2024 09:36:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709804178; cv=none; b=XW14xrbLFXJ59n0pxvRqTeHE2v0DtXUKeCXUX6xpwYw1pTxPeTBKknoa7IVBMbCFaJqnTWwHgpbM3tHUawrz3Q+YGmUL22C6Kf/0doB+PIv6be6EPGR9E8684ooDR7XCyvmLRm62j1fwbECicjIplpvi68lK9lnYgDAn0lRLe0Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709804178; c=relaxed/simple; bh=P5xG7fHkgrGR5tgOHafwG7T4K3Ym7sMnppLoHfjyBVs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FsuEMx9vK4uSMGLy4wRfH/LBt/oQc8d2IfaBIMfwSTYT1Bn8VKYDiBjPy7YLdbq4fiAqO7tqwhPZsSXTB3YdBCnJ6iQ4JF+s4JRVxW+45ZGTvN2TmT+bEde/7S2LrorRf1UgNbucjXuK/SlLcGXSsXMof5O62JxEEp7vUaX9044= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=grimberg.me; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=grimberg.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-33e12bcf6adso215561f8f.1 for ; Thu, 07 Mar 2024 01:36:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709804175; x=1710408975; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=P5xG7fHkgrGR5tgOHafwG7T4K3Ym7sMnppLoHfjyBVs=; b=O9NwCwYJAiOnosCfYI8usErsMsy9HcGjWLq2z3KteqhNh4b17Wzg4x2cGw6L7sRMI7 /Eu1Vpl4lN5OUOtMhmtqkoy/Zhag9ca57Zz7aOZWaZAWD9Q001bu0lh2UCQuVnlkzIO6 e9lnss2VWu8IrqD+UnxtfX1Q5oeTYSVSOX3hXiyDoOTmRywvj8rwP+rAvEa6TunChCqu CDu8HKLcOdqceGWZ7TKJMbHgilGq31Ys7+F8P31gYW3w4x0vk8Vr2SCAGIRiMHezmuhN 1DmfV/LvLm6v+g7wmELycWYOQwbAjlcESw5WMnbT7+MHByqqVBL2hy08MzNtT6CJhUSg lfpQ== X-Forwarded-Encrypted: i=1; AJvYcCURZTGBPEln92jPV1e5az6llQhV7hldx6DROB1dAjO8bpo8GHdmwJig6ArV5xWTZsF+jmHKguN/3PR1amqa1/tM+qiEijLd4zQ+grUu X-Gm-Message-State: AOJu0Yxw/YkYL0mZNDDte1fJf4dB53GIl9wtqF96nU99zmRfrfLEhWLy dyJZYGRVMvvuY2HJesmmUUQpAIX7Qa+oPBytTFZRzAWNjddRilQx X-Received: by 2002:adf:e883:0:b0:33d:9e15:12bf with SMTP id d3-20020adfe883000000b0033d9e1512bfmr4090018wrm.3.1709804175143; Thu, 07 Mar 2024 01:36:15 -0800 (PST) Received: from [10.100.102.74] (46-117-80-176.bb.netvision.net.il. [46.117.80.176]) by smtp.gmail.com with ESMTPSA id v7-20020a5d59c7000000b0033e475940fasm7451170wry.66.2024.03.07.01.36.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Mar 2024 01:36:14 -0800 (PST) Message-ID: <6eae3879-f9d2-4fe3-96b1-c9e2aa939264@grimberg.me> Date: Thu, 7 Mar 2024 11:36:13 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] nvme: fix reconnection fail due to reserved tag allocation Content-Language: en-US To: "brookxu.cn" , kbusch@kernel.org, axboe@kernel.dk, hch@lst.de Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org References: <20240228091417.40110-1-brookxu.cn@gmail.com> From: Sagi Grimberg In-Reply-To: <20240228091417.40110-1-brookxu.cn@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 28/02/2024 11:14, brookxu.cn wrote: > From: Chunguang Xu > > We found a issue on production environment while using NVMe > over RDMA, admin_q reconnect failed forever while remote > target and network is ok. After dig into it, we found it > may caused by a ABBA deadlock due to tag allocation. In my > case, the tag was hold by a keep alive request waiting > inside admin_q, as we quiesced admin_q while reset ctrl, > so the request maked as idle and will not process before > reset success. As fabric_q shares tagset with admin_q, > while reconnect remote target, we need a tag for connect > command, but the only one reserved tag was held by keep > alive command which waiting inside admin_q. As a result, > we failed to reconnect admin_q forever. > > In order to workaround this issue, I think we should not > retry keep alive request while controller reconnecting, > as we have stopped keep alive while resetting controller, > and will start it again while init finish, so it maybe ok > to drop it. This is the wrong fix. First we should note that this is a regression caused by: ed01fee283a0 ("nvme-fabrics: only reserve a single tag") Then, you need to restore reserving two tags for the admin tagset.