From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9F04282F13 for ; Tue, 25 Aug 2026 00:55:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787619347; cv=none; b=TXmVXu7wV0XCLRJtrR7btPz8ABJr/gvrfDvKEvhVDlg+CQ8jNIxEqDdKEKqySvY/D6Z6U/ulPxM1249bCJj386DRj4cjIQZ7+zLbQ5AxCybkECr0wGp40P50pIx8Mm6dmA9i8e8dzkEcgTfLhkORBzANTN4dxlKY90T5zaW2Qu4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787619347; c=relaxed/simple; bh=7EIjNNO03ZlE10avym2bLNqjPH/haXmKsmM3fQ17xg8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IRK2sJgm4BftG2j9guogRI11emH3IsVd7vu8Jh/hvYe3OYSPd9dHYrBtQ4ai4EdCqDvFvEznkk7MVR9MDRXXdmPsL8emqEjSicRXkIw9YBFUDw39DklYt3F2ZpD3uVUrwlXA0F2HXFGaSCuzvtNskOv1c2KpOXdB86uOoQmj8IQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AUA30opf; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AUA30opf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEA951F000E9; Tue, 25 Aug 2026 00:55:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787619345; bh=ymhGeasTra0VT+6Ztf7PndU10djbi5IDK4lv3hjVh7o=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=AUA30opfEo3pvPMtNC9RUzOY9VBDLvGtgYCqICq+jNKNYcqpIk8IiFgmaG6DW7ZD1 waE1t9j0J4QLdPcfoCiixqe+mGLl2A8g+hlNNwhBkp9o5OKzSOmCtuhvA+PGWruKrD Imk6LASBNub9knucPXGFBdRc+pSaQrjeu6u0z+dP7KdBnztIwDYOxF9K7yjQRFEmGU rUtL51b0fFavUBaIEXHPAN5NS222Xce90C1d7TVwY9wW+oN9hYs3Qtq0arkeIsBIIE cY2TJqcuwaTbX8OIuCWfD/otbYZ1CyM7hsw15B5mSrQaNrVI01PgMuINCV09JXU7NO 3Ogz8LsmUKvtA== Date: Mon, 24 Aug 2026 18:55:43 -0600 From: Keith Busch To: Mohamed Khalfella Cc: Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] nvme: remove stale namespaces by NSID range during scan Message-ID: References: <20260823004641.1369895-1-mkhalfella@purestorage.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: <20260823004641.1369895-1-mkhalfella@purestorage.com> On Sat, Aug 22, 2026 at 05:46:41PM -0700, Mohamed Khalfella wrote: > nvme_scan_ns_list() drops the stale namespaces in each gap in the > reported NSID list one NSID at a time. Every iteration calls > nvme_find_get_ns() to look the namespace up and removes it if it is > present. The loop runs once per NSID in the gap rather than once per > namespace actually present. > > NSIDs are 32-bit, so a target with a sparse NSID space can make a > single gap spin the loop billions of times with nothing to remove. Thanks, applied to nvme-7.3.