From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AF06C001B0 for ; Wed, 26 Jul 2023 13:14:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233793AbjGZNOX (ORCPT ); Wed, 26 Jul 2023 09:14:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233785AbjGZNOS (ORCPT ); Wed, 26 Jul 2023 09:14:18 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F962269A for ; Wed, 26 Jul 2023 06:14:15 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 3365968AFE; Wed, 26 Jul 2023 15:14:09 +0200 (CEST) Date: Wed, 26 Jul 2023 15:14:08 +0200 From: Christoph Hellwig To: Sagi Grimberg Cc: Keith Busch , Pratyush Yadav , Jens Axboe , Christoph Hellwig , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nvme-pci: do not set the NUMA node of device if it has none Message-ID: <20230726131408.GA15909@lst.de> References: <20230725110622.129361-1-ptyadav@amazon.de> <50a125da-95c8-3b9b-543a-016c165c745d@grimberg.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50a125da-95c8-3b9b-543a-016c165c745d@grimberg.me> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 26, 2023 at 10:58:36AM +0300, Sagi Grimberg wrote: >>> For example, AWS EC2's i3.16xlarge instance does not expose NUMA >>> information for the NVMe devices. This means all NVMe devices have >>> NUMA_NO_NODE by default. Without this patch, random 4k read performance >>> measured via fio on CPUs from node 1 (around 165k IOPS) is almost 50% >>> less than CPUs from node 0 (around 315k IOPS). With this patch, CPUs on >>> both nodes get similar performance (around 315k IOPS). >> >> irqbalance doesn't work with this driver though: the interrupts are >> managed by the kernel. Is there some other reason to explain the perf >> difference? > > Maybe its because the numa_node goes to the tagset which allocates > stuff based on that numa-node ? Yeah, the only explanation I could come up with is that without this the allocations gets spread, and that somehow helps. All of this is a little obscure, but so is the NVMe practice of setting the node id to first_memory_node, which no other driver does. I'd really like to understand what's going on here first. After that this patch probably is the right thing, I'd just like to understand why.