Article View: linux.kernel.netdev
Article #2263Re: [PATCH net-next 0/2] net/mlx5e: Batch RCU grace periods on channel open and close
From: Toke Høiland-Jørgensen
Date: Mon, 12 Oct 2026 10:40
Date: Mon, 12 Oct 2026 10:40
40 lines
8046 bytes
8046 bytes
Tariq Toukan <tariqt@nvidia.com> writes: > Hi, > > This series by Carolina reduces the time mlx5e spends waiting for RCU > grace periods when bringing an interface up or down with many channels. > > Today the channel open and close flows call synchronize_net() per > object. On close, RQ, ICOSQ, TX SQ and NAPI teardown each require a > grace period, so the number of waits scales with the number of channels. > TX SQ teardown adds a wait per traffic class, and XDP and QoS can add > more. On activation, mlx5e_activate_channels() triggers the ICOSQ of > every channel, and each trigger waits for its own grace period. With a > large channel count this makes link down and link up slow. > > Patch 1 batches the waits on channel close. Channel deactivate and close > are split into pre_sync and post_sync phases: the ENABLED state is first > cleared on all queues of all channels, a single grace period is awaited, > and only then does the teardown continue. NAPI instances are likewise > unlinked with __netif_napi_del_locked(), followed by one > synchronize_net() before the channels are freed. The existing per object > synchronize_net() calls are kept for single queue paths. The change > touches the regular channels as well as the PTP, QoS and XSK queues. > > Patch 2 does the same for the ICOSQ trigger on activation: all channel > ICOSQs are first marked as requiring locking, one grace period is > awaited, and then all of them are triggered. mlx5e_trigger_napi_icosq() > keeps its existing semantics for standalone callers. > > Results with 248 channels and rcu_normal=1: > - ip link set eth2 down: 10.183s before, 0.715s after. > - ip link set eth2 up: 3.095s before, 1.794s after. Nice! Thanks for tackling this :) Don't know the driver well enough to comment on the details, but in principle, emphatically: Acked-by: Toke Høiland-Jørgensen <toke@kernel.org>
Technical Details
Message-ID:
<87cxtfqk0o.fsf@toke.dk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344899-linux-kernel-netdev=dewy.ruReferences:
<20261011133212.807979-1-tariqt@nvidia.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344899-linux-kernel-netdev=dewy.ru From: toke@kernel.org (Toke Høiland-Jørgensen) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 0/2] net/mlx5e: Batch RCU grace periods on channel open and close Date: Mon, 12 Oct 2026 12:40:39 +0200 Organization: Usenet Network Message-ID: <87cxtfqk0o.fsf@toke.dk> References: <20261011133212.807979-1-tariqt@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="1754757"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:JcYCfXN2/raDO1dtG/gmo8qIYcA= sha256:eryDaeII9N+pBzqANUrG25vD6TIkhrKa238DZa+lsHc= sha1:eHs1B524YPrf2FM+1fqURYD8MNY= sha256:hubEnaG29fzWpXdKkLHA6TLU0ENMpucR5wZywyZUMBE= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 48DDF10FB96; Mon, 12 Oct 2026 14:09:43 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -1.341 X-Spam-Status: No, score=-1.341 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.241, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dZ84_H1aovnP; Mon, 12 Oct 2026 14:09:39 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-344899-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 7C21410FB91; Mon, 12 Oct 2026 14:09:30 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 70FE865E20; Mon, 12 Oct 2026 10:40:44 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B7293ACF1D; Mon, 12 Oct 2026 10:40:43 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HrZ+jots" X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E5DB348C7C; Mon, 12 Oct 2026 10:40:42 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791801643; cv=none; b=m6GSwdiBRx2J4pcGcaffch+AironYzY4e3TWyso0SiAaULwKa235YMJCHkbe1EKkLywTBFThMUmdTvpW0FX2WwkPQf7iFU/5ETyD5D26BIuIscrKM1ZXNi6j05gtpU1aoZAUHcBeoaT/hnTirKbzr4ADlQNVJKwyLrQF/++nxno= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791801643; c=relaxed/simple; bh=0lqlHCY1i9/hvpDM/SFAMnNmI36PW0atq9twP1Ql5UU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=qsxptKN3xohcNP64E1j/SZDc7fKXHDG7Fbt0qWO1Ct5XgHrZsgOgGeZvHWWu5xMoqfQzti6IL5qRBk6xsQDiekUm0kiHe9xMnVoHumdpySJde/sk016bttKHUFLfeiyrGme1kI+Ere6g0MqvlnyOCUNjKCgQoniDCIE8yXhJpSg= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HrZ+jots; arc=none smtp.client-ip=100.103.45.18 X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id EED301F0089F; Mon, 12 Oct 2026 10:40:41 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791801642; bh=0lqlHCY1i9/hvpDM/SFAMnNmI36PW0atq9twP1Ql5UU=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=HrZ+jotssrXgtMm9Lrf2S7dF6bwHiq+8xfu35AQgvaxE4bPrMAoDE3mfC489K01EI 3qXYKxAAB20DNFQpVx5Ht06Dkkl3A4X0NDlzjalz2YghWjCFPOWIVZ5OhnPxRQVi05 +5/rAKxPYK8LF3F+MiM693CZ3UtfqzLpa3DOyu9eHqg5N0rL80MaxaOg3NaUkAFl7M Zd8ZiwNhQj+eXG87WKpri264X9Nsuh0MTigI9mpqD1B4P67URIWjmQ+WTfjHDQzktI gqakU7RXHGxKymjvJZLJOwsLfe1SHTkH0favxB6VT4Qoc9BSrtEILhIuMTDa4dY/WR uSCBVpM+w8zmQ== X-Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 54EADA8936A; Mon, 12 Oct 2026 12:40:39 +0200 (CEST) X-Cc: Alexei Starovoitov <ast@kernel.org>, bpf@vger.kernel.org, Carolina Jubran <cjubran@nvidia.com>, Cosmin Ratiu <cratiu@nvidia.com>, Daniel Borkmann <daniel@iogearbox.net>, Dragos Tatulea <dtatulea@nvidia.com>, Gal Pressman <gal@nvidia.com>, Jesper Dangaard Brouer <hawk@kernel.org>, John Fastabend <john.fastabend@gmail.com>, Kees Cook <kees@kernel.org>, Leon Romanovsky <leon@kernel.org>, open list <linux-kernel@vger.kernel.org>, linux-rdma@vger.kernel.org, Li RongQing <lirongqing@baidu.com>, Mark Bloch <mbloch@nvidia.com>, Richard Cochran <richardcochran@gmail.com>, Saeed Mahameed <saeedm@nvidia.com>, Shahar Shitrit <shshitrit@nvidia.com>, Stanislav Fomichev <sdf@fomichev.me>, Tariq Toukan <tariqt@nvidia.com>, Adrian Moreno <amorenoz@redhat.com>, Michal Schmidt <mschmidt@redhat.com> X-In-Reply-To: <20261011133212.807979-1-tariqt@nvidia.com> X-Clacks-Overhead: GNU Terry Pratchett X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>