From nobody Tue Jul 21 03:17:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4h42cN5vKPz6lQFs for ; Tue, 21 Jul 2026 03:17:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h42cN543Vz3vTT for ; Tue, 21 Jul 2026 03:17:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784603828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qwKdyrmdRQ9WXAznFA5rs5QSXROZH86LDP2moYdLYoE=; b=APFPhinNZ35eoMh05fqcZz2xtkvBN5iRa+JolnjPc1F1ekEo0yYnVIpRbzH/+lHSs8T7Z5 ExBewnPHp0Z2dzMRDYYB+ZqF7ZR96FDsLFlERSHS+8bEg1VBCpFQmnSf7Ivm+7lVu4xYaB kxaLO5xRooRzUHUugGoKp0kaVr2BVWg7OSmd7U5tNiypicWujn1qiP+5yCR0/bTrFL0QGA nOXjMOVz7Nf+Uxb1/UeoWMsEkxqvXcAVG7xGVlTwJMdoVB5P/Dg95Y1JsMr9mVECuzzY51 Dg+vUURFULpu+TeflfME/4zVcipLmWztslPwVUq81oQZmS563duzPHUXNf33yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1784603828; a=rsa-sha256; cv=none; b=gsaKwcRH1hw+EbFfJkviG+IJ8I+eQSqPeXg+AIwBbSQjGLBq3lkFhK6lKZA7sln4c+k2Wf MCI8YTBf9uakPoK4sbJG4cOVGrt4XclFrROxqhodFNrdSxbIqXN/EauBiaOrtZEukvZsLW 06OYHxvmGBjiUMqE1T8c65nWKhv6pzq4/cEUTqeROCw2uP8faV6F5RvQdpjPf9LY3QR1mg 9HxjDuJs+F6u4cSBeEw5q6Qr3MvAJ7x9rgAQLpchZ/S22jmbgMQba9jpiy6rEvgUmylyTs /hKdDamZlRfzDptRtWSMUuQ+VB218X2ZZaMLIgl3S4TBPKFzgpbj74UNg1EB3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784603828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qwKdyrmdRQ9WXAznFA5rs5QSXROZH86LDP2moYdLYoE=; b=JJQdtyY+oa38XWKAjmbt7QWXz6kAL3t7i+yMIeBYk5HB3uDKTl3f0QZJypfJrPNSpTNVaA AHqig1FVZ+CYTeQSUdVJp9jMjkt+9XnNAbt7i1lsOEulW4WfcvdU+KFBOLSozfiUhU2NKn 8QL5Z6SUMmoGklP0NjzAIBvaY17j/KOFyXmzeLbf3pgYgX5uamVkaz23gerHHB2hoUN8dv 9EonjSi55cv9ogJDbvQ+YAQscVwAHnbF+mgn8fJqWaRK89CKkU3JLQX0G+mtrqzFG4NdQp b1hm0bWXdrrkiPN0sejVe3ZZGqKfRQGO8qh+1v2y/vdgiLynb2yfg+6/d/rMLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h42cN3t2VzVgd for ; Tue, 21 Jul 2026 03:17:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26818 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Jul 2026 03:17:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 381100312788 - stable/14 - ena: Put taskqueues into correct domain if !RSS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 381100312788276ef88eb9a409a5babe5d94acc9 Auto-Submitted: auto-generated Date: Tue, 21 Jul 2026 03:17:08 +0000 Message-Id: <6a5ee4b4.26818.8e1f7bb@gitrepo.freebsd.org> The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=381100312788276ef88eb9a409a5babe5d94acc9 commit 381100312788276ef88eb9a409a5babe5d94acc9 Author: Colin Percival AuthorDate: 2026-06-27 23:33:46 +0000 Commit: Colin Percival CommitDate: 2026-07-21 03:17:01 +0000 ena: Put taskqueues into correct domain if !RSS When compiled without 'options RSS', the ena driver created taskqueues using taskqueue_start_threads_cpuset passing a mask value of NULL, both in the ena_setup_tx_resources path (for enqueues) and in the ena_create_io_queues path (for the completion-processing). In the default configuration, on most EC2 instances, this results in taskqueues running in the right NUMA domain, but only by accident; in non-default configurations (e.g. with with multiple EBS volumes attached and associated NVMe taskqueues) the taskqueues may land in the wrong NUMA domain even on instance types where the one-EBS-one-ENA case produces the desired results. Set (struct ena_que)->domain and use that to inform the choice of CPU sets. On a c8gn.48xlarge EC2 instance this doubles throughput on a 32-TCP-stream benchmark. Reviewed by: akiyano MFC after: 7 days Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D57918 (cherry picked from commit 2e21f7e8140447c2dcbc964ff3482f12f9bd6683) --- sys/dev/ena/ena.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index b91fade61cec..486fafa7c045 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -726,6 +726,8 @@ ena_setup_tx_resources(struct ena_adapter *adapter, int qid) snprintf(thread_name, sizeof(thread_name), "%s txeq %d", device_get_nameunit(adapter->pdev), que->cpu); #else + if (que->domain >= 0) + cpu_mask = &cpuset_domain[que->domain]; snprintf(thread_name, sizeof(thread_name), "%s txeq %d", device_get_nameunit(adapter->pdev), que->id); #endif @@ -1671,6 +1673,9 @@ ena_create_io_queues(struct ena_adapter *adapter) #ifdef RSS cpu_mask = &queue->cpu_mask; +#else + if (queue->domain >= 0) + cpu_mask = &cpuset_domain[queue->domain]; #endif taskqueue_start_threads_cpuset(&queue->cleanup_tq, 1, PI_NET, cpu_mask, "%s queue %d cleanup", @@ -1815,6 +1820,8 @@ ena_setup_io_intr(struct ena_adapter *adapter) static int last_bind = 0; int cur_bind; int idx; +#else + int domain; #endif int irq_idx; @@ -1827,6 +1834,9 @@ ena_setup_io_intr(struct ena_adapter *adapter) last_bind = (last_bind + adapter->num_io_queues) % num_buckets; } cur_bind = adapter->first_bind; +#else + if (bus_get_domain(adapter->pdev, &domain)) + domain = -1; #endif for (int i = 0; i < adapter->num_io_queues; i++) { @@ -1860,7 +1870,7 @@ ena_setup_io_intr(struct ena_adapter *adapter) } adapter->que[i].domain = idx; #else - adapter->que[i].domain = -1; + adapter->que[i].domain = domain; #endif /* RSS */ }