Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1033906rwb; Wed, 26 Jul 2023 06:44:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlEXjtB1oXSl7+BimHHe9RSwBBqIEcvK/A8WBMImgFlD1swSzoXuIfASu0hQ327evL9nQDrM X-Received: by 2002:a05:6a00:15cb:b0:67a:31b7:456c with SMTP id o11-20020a056a0015cb00b0067a31b7456cmr1868744pfu.9.1690379091652; Wed, 26 Jul 2023 06:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690379091; cv=none; d=google.com; s=arc-20160816; b=eM/e/6HZsqP/GNRkQpP0veeROXwrqnxx8x7SnGhuuHXC35FVuukRqzthpekY2q2bPE dtuEnqOY+WtZtv2TWv/ZC3oGZF8oX4nttJHNa5Zg5CflIPOLTNA0BiQdTiA4zePg7+Fw SBaal6TbHEy9yYqSzyhlIgxdgXTZTy0R3xI19zT7BVFVxziuAuNLsOHiAn2jhRh4GTPj FZd6ipqKyYR52FuRFPsy78Eyw/kQEUWdjBrUzTJaPQt9A/Fy3X4CXeAiYFM2VjhFeciC diJHvzvD+iO39qGW5Uyv2/BxrzhNzOgO4PkeFdtYp/aeN8qDeMo3G8J5j7aiq0MSZYTE ZUVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=7lrmCC0HwvEPSQq4RuysImkZk6ogosfB94MGK7eCfJM=; fh=6baZMHQZmUusXPoeTSDTV8IKebP0y9tC9wUV7qBT3NA=; b=JMWxyfPPwfRehY+EwjjWco9JVhNeV03Ui9zwtCAXj10PXz2HbxdiLg8tMGpcX85J9M +sLtrqlKSZbCzNmbubAPKj1ahT3+fZCI4ZcRK6i11opRByn2LrFpyvrTWpK8CF1jURDw 02J9VPG2ZpnriCLqMT+IGbpI/j9pNusVWaqhpsNKFiFrUTu2OuyujavSrjLGhHpTnuFs rGYxIY35WYB0yYCySv3ZgEeBWtUrwf0YS9sN+FgBFoGjKkbS4h5jlqi4u9PINieRxtFt CB2Zok1+ocYypNi5ElaOTWFGy9sbOyk+uuIKCw/5IpJHnBcgE3MmcZxBtrnyLVImHmOD qQQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020a63e24a000000b00553b9b1886bsi13015430pgj.621.2023.07.26.06.44.38; Wed, 26 Jul 2023 06:44:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233782AbjGZNOW (ORCPT + 99 others); Wed, 26 Jul 2023 09:14:22 -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) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.