Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4565645rwo; Tue, 25 Jul 2023 07:55:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlG2P4dHWJ1RKFHCtuD4MkU1TG34pVoG0vONTz9o+Jtl36KOf8x0MFMZ43kfx0Iahx6kSV/Z X-Received: by 2002:a05:6a20:4407:b0:135:26ad:132 with SMTP id ce7-20020a056a20440700b0013526ad0132mr19113726pzb.7.1690296937501; Tue, 25 Jul 2023 07:55:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690296937; cv=none; d=google.com; s=arc-20160816; b=HpKW5d07Kien2JiI1M0rNIp6QoD2dVejmUl5mPhAeYjsz4Tqu6CqUmc7reT/fv15VS xBKPb8A+SQST6YvRSEcThYjVgYBH99rbblKiXL1ueVuOT6NkHWh5nDQLX5ToceB0jbVm JxBZGU4h41Oxa2NtNvfhqLYznN0qIoVM+1mZxsRhYjDIhN7tKHfYf0PodshOIGB7pcx5 5zhbG/41exhhfKBDUmlEHwWo0OIs+W9hkAaQPB1/qaeKhMIef0bqj2FBbz/0gQ2FfDHq 5Txr6a/vHDbRcbuqJoKhuE6dL77eHYPa34u+/hRlLHNt/3lk+vyKSVdaJ+md7E54ZJ70 HoEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WWBebdUOHAwGjNmUd0BLD5EBUj4u21H/flsLVNiSGyE=; fh=/zAp6lTEComQvgTTtD0zE1Y3eju03I/GUx93TQ1s4Qc=; b=lDgL7vqDTO5G649ME8FyT3VIoueNeIkigPvNI7skPg/0pz5q9KnY3UEyfwIMbQTdnh UfcAi8U98c/d+yoEJnBL2qji7ygcwVN2/de0aRK3WwW2wV+ddkzC6wFxFXM+5DB9P1J7 VWn6xoarP2XoEtjiYkcYnTIzVRPl6UwuUIzaOWdKgP/ySk4YqHnwkhQRrY3EDEMJnmjX iVDegrdKguQqcg9E6RMMNWD/p6fuG+oX2y6XdL+q46Hp5MvPXmgJKv5W6rnsOPlnI6Is 0ulHigptGVxDGMIM7wNG1AwQDaSvPjuYL/vz04YW8Y7C3++jFx3a1pLUE1gP+KaqUns2 +j1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IerEz7os; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x10-20020a056a00188a00b0068231201456si12313355pfh.173.2023.07.25.07.55.25; Tue, 25 Jul 2023 07:55:37 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IerEz7os; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232032AbjGYOfY (ORCPT + 99 others); Tue, 25 Jul 2023 10:35:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229700AbjGYOfX (ORCPT ); Tue, 25 Jul 2023 10:35:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48AAEC1 for ; Tue, 25 Jul 2023 07:35:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9928D61781 for ; Tue, 25 Jul 2023 14:35:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88FB4C433C7; Tue, 25 Jul 2023 14:35:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690295721; bh=WWBebdUOHAwGjNmUd0BLD5EBUj4u21H/flsLVNiSGyE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IerEz7osX93i6yK1JNW2zmIpgHzJcMB+j3yDUJPtDvwWOGcSkxCx31sDEIcFaOk9n GuErLPO0vaQXJjmS0o/WAOEaDFhC9kM3e3RpS4VcbumZRO2tWHRvdoJAGcmKXxPb7v r91/m6ZY1VwuUPMLl6g8giZgnu1HsBa4wZUgmiP93ByjBWGNGEIlYSUePSrGu2KEsb IcYci2QbXP0UkLRNW2M5VYVotMEzA9e87AI6Dw/y6AAGXsj40bS3RsIZot3n8LeoBk xEQ6gPTeG5N0p9QioniD/xm6JBhSsUTTBMAFi1fSIjl9FtG4Qpue3a/thTAm/J2s4+ w49bXwqQu0ZPA== Date: Tue, 25 Jul 2023 08:35:18 -0600 From: Keith Busch To: Pratyush Yadav Cc: Jens Axboe , Christoph Hellwig , Sagi Grimberg , 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: References: <20230725110622.129361-1-ptyadav@amazon.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230725110622.129361-1-ptyadav@amazon.de> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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 Tue, Jul 25, 2023 at 01:06:22PM +0200, Pratyush Yadav wrote: > If a device has no NUMA node information associated with it, the driver > puts the device in node first_memory_node (say node 0). As a side > effect, this gives an indication to userspace IRQ balancing programs > that the device is in node 0 so they prefer CPUs in node 0 to handle the > IRQs associated with the queues. For example, irqbalance will only let > CPUs in node 0 handle the interrupts. This reduces random access > performance on CPUs in node 1 since the interrupt for command completion > will fire on node 0. > > 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?