Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7825164rdb; Thu, 4 Jan 2024 08:47:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZCP+RF6AnIBwtxYvG1xa5LG0YvXuUmsR7gEbx7pCmIMq6vIkOTDb+jj9NIgLVKkeciUf2 X-Received: by 2002:ac8:5c12:0:b0:429:73b9:9e08 with SMTP id i18-20020ac85c12000000b0042973b99e08mr465684qti.49.1704386864331; Thu, 04 Jan 2024 08:47:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704386864; cv=none; d=google.com; s=arc-20160816; b=fLIho3Gw19jNnVQX8hJOs037VEJEDbedbfa+fXIul2asI6tjR8eBLGyrIDTpDcTUA0 kpISLadvF0x4C2cLOatqDtuJhRktNMZkDaXRnp6YcCfZuW100j7x/k06W2quPrHEq724 gAsdw0AioiokdxNUPMVMtrYdanUlmjUnf9U9ZUEWFXtb7Wz9tX53sLhDHOPjBsfsOJlB yKuP5DwNQkRoAgQOtzjFPhjzW0EuvCYgYtiG2ldkNZBf9IkC/Cj+3s/VL1oqFTypwVON r1NyOC/ozcIMmLgxBKdC6YL3j5V6XBNoxI0YYqxp0lHPsc+ZGD79e++ovuZaune8YDdc gFqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rlOUemu3DMWy7bRRhfReOsckz6TeZyAkeLf3pQ4MJ1k=; fh=pzHo+uekR0bEdaxJBoCHm0fDZES0pAkpEWkktbHrdp8=; b=vVAYqLyxTq/KbKjEJKp5pkpa09Pma1gVaP83gk11SoE0r8Hize3NFIIJPrDXtWp2P3 9ZYHdTBjCM+QcQ+WI5M/krxMsCm04zmQ6PUrd7DWR4DvoVZqH60iWzmU/dCynX/yDNSe P1ccerY8dUR/L4yvZ5Vwmt5STkWrt5stAy7cznHK6117LUUDaI5tSJkYm8gQTIS2Yo6c ftDt0KL46wA+Wb6MEdRcHjQ9SJInFNmTxJQvkCC2jYHJCfrEEyLQzleNfba+Xwsq30pm mOe+JKuZ0rYplBMBLYmhaS9eqCHQWOUNAFhNOYKweOJg3kQR7gP3IpV8yayhMMIKacDw JbYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GmUFVV+7; spf=pass (google.com: domain of linux-kernel+bounces-16965-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16965-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 f10-20020ac859ca000000b004283da5ee0asi2629407qtf.293.2024.01.04.08.47.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 08:47:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16965-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GmUFVV+7; spf=pass (google.com: domain of linux-kernel+bounces-16965-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16965-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 1BFCE1C2253D for ; Thu, 4 Jan 2024 16:47:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF8FE25567; Thu, 4 Jan 2024 16:47:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GmUFVV+7" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0EA2B2555C for ; Thu, 4 Jan 2024 16:47:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1113CC433C7; Thu, 4 Jan 2024 16:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704386859; bh=gUL3ydGH9gI1f05tOKDtRIs4ksaWn/LR5N9XebQaO1A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GmUFVV+7jEZvhSjq03hi0FLNJ85H8T6nqcxIvwlhNEJls+vxHNPopDZalFbP6Uo81 qPR6VobMUiIbrOgEkd27J59G2rbFxza+r0VWkux2Z7yB4YLeaEUvVXgraY4wvILYcf zpjVhyVt0L8x3rq44R4OW/VNZq0iaR668hl2VMbm8vXPM9aUTylTNEy5r9aKgVxWOq WQhkOngqIIeDJh+k2aryhU28WPQWfhhDseHzll2NRbm7zdmBjt1i3QXBpuH37iUHog w8+KjRy3K67WgWcVtLr5iGaqLNJEgb9mdxfH4aI/y4fGKxuemOdHHqKCImDzE/A+n7 5EWpxHeVv9sFQ== Date: Thu, 4 Jan 2024 09:47:36 -0700 From: Keith Busch To: Stuart Hayes Cc: linux-kernel@vger.kernel.org, Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org Subject: Re: [PATCH] nvme_core: scan namespaces asynchronously Message-ID: References: <20240104163826.10561-1-stuart.w.hayes@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: <20240104163826.10561-1-stuart.w.hayes@gmail.com> On Thu, Jan 04, 2024 at 10:38:26AM -0600, Stuart Hayes wrote: > Currently NVME namespaces are scanned serially, so it can take a long time > for all of a controller's namespaces to become available, especially with a > slower (fabrics) interface with large number (~1000) of namespaces. > > Use async function calls to make namespace scanning happen in parallel, > and add a (boolean) module parameter "async_ns_scan" to enable this. Hm, we're not doing a whole lot of blocking IO to bring up a namespace, so I'm a little surprised it makes a noticable difference. How much time improvement are you observing by parallelizing the scan? Is there a tipping point in Number of Namespaces where inline scanning is better than asynchronous? And if it is a meaningful gain, let's not introduce another module parameter to disable it.