Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp735557rwb; Wed, 26 Jul 2023 01:50:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlHyBvoYpakp8EndYp8xjHGqfQgRKLl5OY6J3o70oNYW9gcBdJpfCLxUr6IwfgDVPqI6Je+8 X-Received: by 2002:a05:620a:4416:b0:762:499d:d9dc with SMTP id v22-20020a05620a441600b00762499dd9dcmr1878333qkp.54.1690361442170; Wed, 26 Jul 2023 01:50:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690361442; cv=none; d=google.com; s=arc-20160816; b=QazdCdyLY3hI3cmE26n6jPjSdXgH2qfVuaElriCg6EucBOmUk3YQH7p8oy1S025Vhx T5zr2IzT2VLuL4HXDePx2HoAT6HaKbw273uQ5lwl2e2YnAH6gNbWHPCSpo9Fc7i8Kq1C WyNnNx44unNwqUWovNUrtujoOm016MnECUZ+c3UxgM6eG43jqIQJI5JUcJJBJK1+WXx2 8kDT+G9qdBYovhjPRBnYzFxcy381bI7qXuY3xsEtCAgOR18Umrz/GE7O6D3EiC0sgjWH 9hGjkLZ7SSzV1BpGBmMMrpSeczNNx73+RHwgcSPhdSxEN0AARViW1cZlJ6fY3rb9SkDD IonQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=rArkLhnWUlIK4304QM/qMQbcdjqKn5ft/zJeEhBuNj0=; fh=eH+375P5bx5c/mJWL42laPeuAMZpjt4NbWg3a7wkwCo=; b=vsupgCu2TLOmo6j1cmkKjE2U5PTccdtRemjqi2/uEE894xDD0I0rCBlnnyAcRGwqK2 /5s062cctmImoxegCp6Cpu/y6S+d9Ny2ZJAnzmd9RADHviZPwR1gg4pYfsxKLhS1Z13K q09y2f3Sdk+oVG1OEL4t76Xto9GNHx0CtYbUEnIgv0TkSq+BJOUXQKhqTgrXXudwywdr iKQ0IguerORL5j6qp7V+J9Tw+9sps4W7tgQT2LiM+aFheHNl6x9F5EdP+Y8LbDcRsXZv RVsie023DBIewqwe+JH1bJLd8XcQu/kH2MfWxcmQD64A4FfA9YnrF62eTH518K4ug0xl WxqQ== 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 be6-20020a056a001f0600b00660b5630908si12273858pfb.269.2023.07.26.01.50.28; Wed, 26 Jul 2023 01:50:42 -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 S231545AbjGZIG4 (ORCPT + 99 others); Wed, 26 Jul 2023 04:06:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231891AbjGZIGV (ORCPT ); Wed, 26 Jul 2023 04:06:21 -0400 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 374AB5257 for ; Wed, 26 Jul 2023 00:58:40 -0700 (PDT) Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-52218903f41so1102759a12.0 for ; Wed, 26 Jul 2023 00:58:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690358318; x=1690963118; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rArkLhnWUlIK4304QM/qMQbcdjqKn5ft/zJeEhBuNj0=; b=XIzN9RecS92t8YlHN8t2c/RQuqX/QY+mS0bCi/pJA0s28U8I5zVaJD4mlg2ZPj3F1g b18F/DGLY2soT962KTHvNlU7T5LrRAnhztc+FCDsDofV5Md1mEJhIqzeVvYnTOji89fP YjpRHYwQy6WhX2+dVyd4z4uIxWyAkA+7m8zhXlM1OEZgZR0Jh0JeQ/ZQ5Md+EPoKpH3a QKb+yRNZXI7XfaD+cn5hDXcumtqNz3NxHQG2pd1g2GV0SgGTrIR48WufLzGFVnJ5JowX Q2YD1MgH95/gh6hPyfBrW4MiDz/NTVT9QnpedSQkEozTowmUUS9zioudpi+fjoG7ajXN sX/w== X-Gm-Message-State: ABy/qLb+ER9uHnmKD7afE96bfK207CZeJH0jgCy0kuhC7OU92eWQTBuq Uq9/j7rIqYPFFQb7Hec0UXI= X-Received: by 2002:a05:6402:278f:b0:522:3f32:52f1 with SMTP id b15-20020a056402278f00b005223f3252f1mr1109591ede.3.1690358318560; Wed, 26 Jul 2023 00:58:38 -0700 (PDT) Received: from [10.100.102.14] (46-116-229-137.bb.netvision.net.il. [46.116.229.137]) by smtp.gmail.com with ESMTPSA id v26-20020aa7d9da000000b005226f281bc5sm517939eds.25.2023.07.26.00.58.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jul 2023 00:58:37 -0700 (PDT) Message-ID: <50a125da-95c8-3b9b-543a-016c165c745d@grimberg.me> Date: Wed, 26 Jul 2023 10:58:36 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] nvme-pci: do not set the NUMA node of device if it has none Content-Language: en-US To: Keith Busch , Pratyush Yadav Cc: Jens Axboe , Christoph Hellwig , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230725110622.129361-1-ptyadav@amazon.de> From: Sagi Grimberg In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 >> 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? Maybe its because the numa_node goes to the tagset which allocates stuff based on that numa-node ?