From nobody Tue Jul 21 03:16:47 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 4h42c46904z6lQMl for ; Tue, 21 Jul 2026 03:16:52 +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 4h42c45cBHz3tyM for ; Tue, 21 Jul 2026 03:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784603812; 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=KajwOJeJHjCGO+Kzos92EvUUlPAGb/ztSILTVDnEDyE=; b=MfFhVbUz6fYX39T60nC+RmdsN5RfX+JeGfsH/diYU8shn7h8/zt6IVmo2Eq3fYrTEn5+8m VXLXBp17V+whY5zYAkO+7TWcl9hd/rlHS/haD9Ebpx3yQ3AU6VgEFTxqqByLQH7sZZK0TB LKJC5Wh2EVTrUPaH3xNOP2VOPmcTiT0K25I7VQSmKCq1OZWs1jDc+Lgc4ZaMYzWBYPRb5/ s6pdkAViDFrQjmEYZ8z1TFRYeRWPDjKk+vXMwxXglElOM1VdL3h+IQG9DKoa7tPRPnWEkP kUNYvf3JM81YopuphlF06UrauCoPabvO/cmICwQUL3OVBwwSupIFsxjwBD7qsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1784603812; a=rsa-sha256; cv=none; b=PIKpzGQP4iGbI/t5WpNThXE+ObEFy26gLwhBD51zLV21bN44hV9WQFh58xbwTxcfQDBYOl rh/e4vP5F2nw25DhoYbdk28Atbc3nEiq/B7oJLUYykJO6F+MlaY0Tq2gBHx98Q+9Mm9DTU c2mXj98vP8XazJ+8aijqPRgplU8Jkx8J0jrfyPdGRQ1Qs1wehjqJnVTKgkGfB14NaS2XA/ Fl/Zk9XgmBh3IRw2seCttOrSsmz+o1+T1bBbS7a3xGghjnN68pvpk0k3cup9j3OCQfIF3F SPe7haAYbiz/0zuhkFoZ0DmU9jNsJBvD4DLd+n9GGbweTTZGv3itOz/qeTEHhg== 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=1784603812; 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=KajwOJeJHjCGO+Kzos92EvUUlPAGb/ztSILTVDnEDyE=; b=r96znNRXD7tHdWu3DFNfLZZy7iIgOdmbcr/E42Xv/H8mKfrwIf0BIFzoM5mL2jSz2jGBmi HhLZRNcuxGWZPBXKryU9zlQ6TZTIDA61bmoOlOezEbjVTKfUaqWbbe1HXoPk+FukTby7YS bhYfHujSiAVsyMtKzCV9SliCC7wsZxiWVpvrVdJ4Fm8zhqJH4W6KorzwJ5IntzVi6k4crH jRRCprN0+eAMldlK7/g0OTiUJ1FwcUay93OBt8RteVZXuYp45ghQd/wYdhfQKmeNtLV+IH DSg2Figycg/XYqs5R9u3Lkd89DJy0TaBGlNyum0J2CEIotu+O9yVSbVmGXpmDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h42c44MrNzWTj for ; Tue, 21 Jul 2026 03:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27084 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 21 Jul 2026 03:16:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: acee62f17750 - stable/15 - 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/15 X-Git-Reftype: branch X-Git-Commit: acee62f17750557525a27c18d2de9330a0264bae Auto-Submitted: auto-generated Date: Tue, 21 Jul 2026 03:16:47 +0000 Message-Id: <6a5ee49f.27084.649b9894@gitrepo.freebsd.org> The branch stable/15 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=acee62f17750557525a27c18d2de9330a0264bae commit acee62f17750557525a27c18d2de9330a0264bae Author: Colin Percival AuthorDate: 2026-06-27 23:33:46 +0000 Commit: Colin Percival CommitDate: 2026-07-21 03:16:41 +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 */ }