From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.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 27AA2405F7 for ; Sun, 4 Jan 2026 21:14:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767561283; cv=none; b=PgeO6MPyLW0DDaOrQdxrhvpCk+F90rVW5bqvxbgnilJtaM48l5iIXepZM7qRGPSnn5oZCJRjhDZrEQuZ2WqYp3mHVA87i3NcAHyN0nU80nCmLwfjqO3fVtRAeg4dcz0oin47w6mpZv1qiPBiIX4q35VyIuSl54SwCz6lfVRBpX0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767561283; c=relaxed/simple; bh=5SqyeMfaoKEzgPpLcaHjIb7XjwVUWtX2PqsPkPyYYVQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Rl1Ol+IqzvD6XypoxFySjG3w3TciQZk+aN2jZbEMLzxk5R2+kG/TwlvxEAWZegQNJksalTkrpYYQvjXXNIn3xH+eKrRW1z5esjx8x2fXryT7y6GcGg6NzUL6+fTlx6b4ohI5gOgGcu0R+CtAaUIofFcaJnTzJ4VzUn8kOTaiC7w= 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.128.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-wm1-f42.google.com with SMTP id 5b1f17b1804b1-47755de027eso80853465e9.0 for ; Sun, 04 Jan 2026 13:14:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767561280; x=1768166080; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qNq8Dlg9dgt9AwcFJgT9Gsr/YTM893QKcON0HPwwdp8=; b=nynkPnILfoFuHs1CGiN/O4Li2T387KyHG/8uAcwOVZFpJBBKXNVaD5L7yvaaumtHjN VWWEejn57D5lXkf5YgLmlxedbf0t5vPI9RNISdqSYv18I+IaY1qzDhUpkzzJxgOOQOHe AC9H+Wwo6pbfRCBHPg+hGEBrSy5xVXH1XgWgb99uM3hkE0+VZ//h7ZQSZN1C/yuFicY3 8NdPJt30BjVxAelohRYabnYZVKS91f9z1I1p7zrv6xQWHpkAKjd8FqyV5PDKginfzHcg dI6VkU9qJ1F6nQ7XiYdrWLa1ypBQdcvyU50rcQ6p15979Pqa47+wlZewcEY3CQstyJx9 1ZaQ== X-Forwarded-Encrypted: i=1; AJvYcCXhbU9T2yxdFeeimseyS81izS6PrQJGEHwbo65+GUs3ftsIyYDapjNtvaxGmFgurd+bLzr5Bj0XfhLbm2g=@vger.kernel.org X-Gm-Message-State: AOJu0YyYNXd4s3NchUqnd3svJAL9ToXHpzwQ1DZV1hegXXbVTSCuv3NU 8ezqkDfSEMiOhf2Y8qVOK4pLOSVz/8Ov3EQD5A26S/GLnpZvrCy9FLc3 X-Gm-Gg: AY/fxX6yNBkFShmH6n5TMnVawWq6wBeUEoPKdtpoOi2pxn+tf5aUk+Yg4zVbNvvfqef IHU300/DWEOGWPFmevgt0tw5Eo1olLrZLJZXoRguoIrByN14FMYbJQKE5WmlUeM14dmrqjZoxSM ITDuImaYfYBdtiSaHUtrZd2h9zxORY1CgrlDQJ19X/sMQtnXLWwyhAVPAtB+vmmZRNWXX/yyZHL +WDH8gzhAcDhaGGBILT7mwiquHtLnucEB0JgWEQlpEX9HDNVQmorgMyopuWr+6XvxVHARo/QNwH 1Paaj8RGtfSuVAiOACdfl3havaf4apEXz0/Y9Xe8htna5lTAJvFeTn6la+8o9AWlJx9bN/0ik1f sRrN2C74n39gmhWyMSMHTFWu9sJJ1z+CDxq5Omb58AciBezh73OUo2sBfF20EtOsiR7Gd7UyjJC vnVAdTl00VGUOHPbjRVNhInpuQN/mgHWfwHdRfjTmnKIo= X-Google-Smtp-Source: AGHT+IHs2arPN3RkmiegOcVtY/bLcuBg3k5L5UufZRXlnha3S7kV/nLqLCoygpJQqggk7WxemF89FA== X-Received: by 2002:a05:600c:4e49:b0:471:13dd:bae7 with SMTP id 5b1f17b1804b1-47d195911b8mr534608505e9.30.1767561280324; Sun, 04 Jan 2026 13:14:40 -0800 (PST) Received: from [10.100.102.74] (89-138-76-94.bb.netvision.net.il. [89.138.76.94]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43277b0efefsm63949382f8f.25.2026.01.04.13.14.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 04 Jan 2026 13:14:39 -0800 (PST) Message-ID: <3fb01be3-e162-42fa-8d75-2e96a89b2004@grimberg.me> Date: Sun, 4 Jan 2026 23:14:38 +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: [RFC PATCH 08/14] nvme: Implement cross-controller reset recovery To: Randy Jennings Cc: Mohamed Khalfella , Chaitanya Kulkarni , Christoph Hellwig , Jens Axboe , Keith Busch , Aaron Dailey , John Meneghini , Hannes Reinecke , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org References: <20251126021250.2583630-1-mkhalfella@purestorage.com> <20251126021250.2583630-9-mkhalfella@purestorage.com> Content-Language: en-US From: Sagi Grimberg In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 31/12/2025 2:04, Randy Jennings wrote: >>> + >>> + if (!ret) { >>> + dev_info(ictrl->device, "CCR succeeded using %s\n", >>> + dev_name(sctrl->device)); >>> + blk_put_queue(sctrl->admin_q); >>> + nvme_put_ctrl(sctrl); >>> + return 0; >>> + } >>> + >>> + /* Try another controller */ >>> + min_cntlid = sctrl->cntlid + 1; >> OK, I see why min_cntlid is used. That is very non-intuitive. >> >> I'm wandering if it will be simpler to take one-shot at ccr and >> if it fails fallback to crt. I mean, if the sctrl is alive, and it was >> unable >> to reset the ictrl in time, how would another ctrl do a better job here? > There are many different kinds of failures we are dealing with here > that result in a dropped connection (association). It could be a problem > with the specific link, or it could be that the node of an HA pair in the > storage array went down. In the case of a specific link problem, maybe > only one of the connections is down and any controller would work. > In the case of the node of an HA pair, roughly half of the connections > are going down, and there is a race between the controllers which > are detected down first. There were some heuristics put into the > spec about deciding which controller to use, but that is more code > and a refinement that could come later (and they are still heuristics; > they may not be helpful). > > Because CCR offers a significant win of shortening the recovery time > substantially, it is worth retrying on the other controllers. This time > affects when we can start retrying IO. KATO is in seconds, and > NVMEoF should have the capability of doing a significant amount of > IOs in each of those seconds. But it doesn't actually do I/O, it issues I/O and then wait for it to time out. > > Besides, the alternative is just to wait. Might as well be actively trying > to shorten that wait time. Besides a small increase in code complexity, > is there a downside to doing so? Simplicity is very important when it comes to non-trivial code paths like error recovery.