From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f174.google.com (mail-dy1-f174.google.com [74.125.82.174]) (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 34DF53128CF for ; Tue, 10 Feb 2026 23:25:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770765957; cv=none; b=R4EmR+ruaOL/gxXJWomAFiLYsDY8u0CBBPcvKS2H8fRjkaShV7gnOQVN6Mm4Z2zOf/Idy/X2eoVfN13Bv3nBiUMhmKHTR116DaOUYW2zCe4lBEgnNwBgn4f2x+nOX8+/6I1RI5M+dnXm6i1oCji1s+SDB3zYSrIzW+pi6juGIZI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770765957; c=relaxed/simple; bh=vM9/i96/KeFM/h8A9iMNewuOXZHw4iWa0KQFKKj7C1Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jOvpmQXW2OQoon2lKy6plUJvbZThyu/YoJjbIc/1M3/mbwXOZ0d8HpV909cY/coUVU3g3EcVoksBhsLgCk2RF3eov4cL35mJMx9bjxWgXKaCAkxcNd7ysakzrrLTC7aCI/215oeo1OFkakFYDGCoQCYzLIqdrpEKBPt+tQYZKUU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com; spf=fail smtp.mailfrom=purestorage.com; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b=ZZNc8dQE; arc=none smtp.client-ip=74.125.82.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=purestorage.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=purestorage.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=purestorage.com header.i=@purestorage.com header.b="ZZNc8dQE" Received: by mail-dy1-f174.google.com with SMTP id 5a478bee46e88-2b82c605dbdso3061229eec.0 for ; Tue, 10 Feb 2026 15:25:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google2022; t=1770765955; x=1771370755; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2sIbZBDn7RC8xtlEUpZRZ0I3UvC7oJ11E6UNkED3Ag0=; b=ZZNc8dQEksGMcFgvAOpzNbWNae5nK2bMIdMl835HiYrEU6DVba3odErjBJm3hvN7Ih 0/8asqUYRidWIhbnA1iQbbHmj/W8n569Kwj79cwvRh7tDyCvq1No59dWZg/MpsQ2zAEV fvF3FdffRuDbPPX0AaII7nb74ciKjteOuMc6iCT3YzqXHboKTr+1vdvaR/DgOZ8XLP3Q 0ysZ39c2JvS9UQZoaopIGeiFYF2z3IKdg6UR+WKcnYLTDXfQuA2pgULiTB8Ux6astWN8 q4wnw1ji/ErY+M9cnYtwIgsYsMMI0IK1YueFM9VzkvnbEkMTt8acBM3KubZdGYjS4DTY wUeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770765955; x=1771370755; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2sIbZBDn7RC8xtlEUpZRZ0I3UvC7oJ11E6UNkED3Ag0=; b=V/YlYFx41oOdvRlwcp0lPBJweDt2BSqI5mcXLfZkTeqgP03Sk8jgOWJ9KyB6ogB/vi 1qVYzOP5RHe76VWsdizAIZn6ac6ruT+ktJWH1F3g1yz5Ir8hZWDf2VI0eMw95n+IegHe FT+KGmXdWQ+C01uV3XVTfWBHa/lWqyEX+5QUCmqwbUo9XJFKxPubfzTymErjoOURXsEP eAEo/b5g7gwZ1YG0912YVKmEbf+XHg/UvmsMtisU3qqMo1i23cL0uWEpnGNt8DR1q/U0 iNMggIIkDHhA6PnjXs8y+Mj+K/U3FHyBQwYAaZ4TAeqzfADGGD5/qd45Bvea9upW0HN1 w5jg== X-Forwarded-Encrypted: i=1; AJvYcCXufv7Mio2htuAXZWDcdTO2FTQHnCnh+nmUcVDyHEb4HyWyfakKtBOzUg9ICDydhJpMLWw5eeW2xBHoN6Q=@vger.kernel.org X-Gm-Message-State: AOJu0Yy2oCEigoYoXqU6h6SA61n++StvxXBU2qHBkT7TFK1eZC1X4Avv aSuhDcvcDycuXj3cdYUAGblo49UireNodhgfGmuWCqOPPUqLJ1r8SmCj+V0lzrNAnrs= X-Gm-Gg: AZuq6aKgtztxCbFuCzPbn1v8mTcQtBwXL8mUqb1T4GBfi3YzivmW/Km8SebUYkz0UTp o5ANuAIFTPgCDPiHkfoIdwaOAuLqcLwGiCKdMimYdgEZM69XYCLgTQI9tWJwus2mtgAEfH9Qm4P ejxgYI7n9TyJOQ8kiTXZjwRc5kOwxam7FJcLYVvHnkxh6zdGXgwk+vQvItPsMYjD4RP7kFSN88q AI2SD8U9gVb/YCQvz+EN5p+o9NwvDjUhC5vHmGuYw6RFXHO0gz25X7/evM+290tdVfb5cCbxG54 hAk/uNHCJoTjBDbM/RoqnlgGLrk4DZcBeT/b5BYNvK26IJMOu5IPSjYP/BNi15NIKRiIswcAB/P zKYP0U4sCLrrIih/gOjyGJJzCtbERxETNb/kKwmx1ucA+GMh4vAapXGGZqcZpD9wnvp8EzkGHWJ HypdUPpuusuPCv6wdNv7kspXEpuuve4zvGrxEpmyJEpjY= X-Received: by 2002:a05:693c:6082:b0:2ba:6b03:909b with SMTP id 5a478bee46e88-2ba6b0396abmr3523532eec.19.1770765955031; Tue, 10 Feb 2026 15:25:55 -0800 (PST) Received: from medusa.lab.kspace.sh ([208.88.152.253]) by smtp.googlemail.com with UTF8SMTPSA id 5a478bee46e88-2ba9dbe127dsm27213eec.11.2026.02.10.15.25.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Feb 2026 15:25:54 -0800 (PST) Date: Tue, 10 Feb 2026 15:25:53 -0800 From: Mohamed Khalfella To: James Smart Cc: Justin Tee , Naresh Gottumukkala , Paul Ely , Chaitanya Kulkarni , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Aaron Dailey , Randy Jennings , Dhaval Giani , Hannes Reinecke , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 08/14] nvme: Implement cross-controller reset recovery Message-ID: <20260210232553.GR3729-mkhalfella@purestorage.com> References: <20260130223531.2478849-1-mkhalfella@purestorage.com> <20260130223531.2478849-9-mkhalfella@purestorage.com> <05875e07-b908-425a-ba6f-5e060e03241e@gmail.com> <20260210222732.GQ3729-mkhalfella@purestorage.com> <5f3c9cf0-7fee-432a-b6c5-44fb2acb0b1d@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5f3c9cf0-7fee-432a-b6c5-44fb2acb0b1d@gmail.com> On Tue 2026-02-10 14:49:15 -0800, James Smart wrote: > On 2/10/2026 2:27 PM, Mohamed Khalfella wrote: > > On Tue 2026-02-10 14:09:27 -0800, James Smart wrote: > >> On 1/30/2026 2:34 PM, Mohamed Khalfella wrote: > >> ... > >>> +unsigned long nvme_fence_ctrl(struct nvme_ctrl *ictrl) > >>> +{ > >>> + unsigned long deadline, now, timeout; > >>> + struct nvme_ctrl *sctrl; > >>> + u32 min_cntlid = 0; > >>> + int ret; > >>> + > >>> + timeout = nvme_fence_timeout_ms(ictrl); > >>> + dev_info(ictrl->device, "attempting CCR, timeout %lums\n", timeout); > >>> + > >>> + now = jiffies; > >>> + deadline = now + msecs_to_jiffies(timeout); > >>> + while (time_before(now, deadline)) { > >> > >> Q: don't we have something to identify the controller's subsystem > >> supports CCR before we starting selecting controllers and sending CCR ? > >> > >> I would think on older devices that don't support it we should be > >> skipping this loop. The loop could delay the Time-Based delay without > >> any CCR. > > > > I do not think we have something that identifies CCR support at > > subsystem level. The spec defines CCRL at the controller level. The loop > > should not that bad. nvme_find_ctrl_ccr() should return NULL if CCR is > > not supported and nvme_fence_ctrl() will return immediately. > > > >> > >> -- james > >> > > I would think CCRL on the failed controller would be enough to assume > the subsystem supports it. ictrl->ccr_limit is a good indication that subsystem supports CCR. I do not think it is enough though. I say that for two reasons: - May be this controller does not support CCR but others do on the same subsystem. There is nothing prevents subsystem from putting a cap of CCR at subsytem level. - May be this controller supports CCR command but not now because all CCR slots are used now. This can happen in the case of cascading failure. > > I'm not worried about the coding on the host is so bad. It's more the > multiple paths that must have cmds sent to them and getting error > responses for unknown cmds (should be responded to ok, but you never > know) as well as creating conditions for other errors where there will > be no return for it - e.g. other paths losing connectivity while the ccr > outstanding, etc. yes, they all have to work, but why bother adding > these flows to an old controller that would never do CCR ? If nvme_find_ctrl_ccr() returns a source controller to use then we know the controller supports CCR and does have an available slot to process this CCR request. I do not see how this code will send CCR request to an old controller that does not know about CCR command. I am not fully opposed against using ictrl->ccr_limit to return early. I do not see the need for it. If you feel strongly about it I can update nvme_fence_ctrl() to do so.