Article View: linux.kernel.netdev
Article #5232Re: [PATCH net-next v11] net: reduce ARFS flow updates by checking LLC affinity
From: Jakub Kicinski
Date: Tue, 20 Oct 2026 01:42
Date: Tue, 20 Oct 2026 01:42
45 lines
9367 bytes
9367 bytes
On Mon, 12 Oct 2026 14:01:08 +0800 Chuang Wang wrote:
> + /*
nit: empty line not needed in networking, start with the "title":
/* ARFS LLC Affinity Feature:
> + * ARFS LLC Affinity Feature:
> + * Reduce ARFS flow updates by checking LLC affinity.
> + *
> + * Frequent flow table updates can trigger constant hardware steering
> + * reconfigurations (e.g., ndo_rx_flow_steer), leading to significant
> + * contention on driver internal locks (like mlx5's arfs_lock).
> + *
> + * Skip the expensive hardware steering update if the flow's previous
> + * target CPU and the new one share the last level cache: cache locality
> + * for the application is preserved either way.
> + */
Honestly, I don't think this comment is needed at all. The check
is pretty understandable to anyone with any system config experience.
> + if (static_branch_unlikely(&arfs_llc_affinity) &&
> + old_cpu < nr_cpu_ids && cpu_online(old_cpu) &&
> + cpus_share_cache(old_cpu, next_cpu))
> + goto out;
The last line of the condition is mis-aligned
> + {
> + .procname = "arfs_llc_affinity",
> + .data = &arfs_llc_affinity.key,
> + .maxlen = sizeof(arfs_llc_affinity.key),
> + .mode = 0644,
> + .proc_handler = proc_do_static_key
> + },
You're adding a uAPI / profcs knob. It needs to be documented
appropriately under Documentation/
Please note that net next is closed:
https://netdev.bots.linux.dev/net-next.html
--
pw-bot: cr
Technical Details
Message-ID:
<20261019184218.14d6b8ad@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348962-linux-kernel-netdev=dewy.ruReferences:
<20261012060152.2930-1-nashuiliang@gmail.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-348962-linux-kernel-netdev=dewy.ru From: kuba@kernel.org (Jakub Kicinski) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v11] net: reduce ARFS flow updates by checking LLC affinity Date: Mon, 19 Oct 2026 18:42:18 -0700 Organization: Usenet Network Message-ID: <20261019184218.14d6b8ad@kernel.org> References: <20261012060152.2930-1-nashuiliang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="3759488"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:k9jibKHkVHNgas5yEZ/J/wzmuGM= sha256:UccP5ogYExf4iYdeT/fah6sABnWYqgpUFQtSQC4KeXg= sha1:OOo/kKXZwoJ6Fb69GmCDrV8nyJk= sha256:p1xicMOx9NgXBxLXztcWczDmxomPNFzINSvkwOvcBqk= 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 4865D110BAE; Tue, 20 Oct 2026 04:42:36 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.828 X-Spam-Status: No, score=-3.828 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.329, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 tg2kgfxE6x9A; Tue, 20 Oct 2026 04:42:32 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-348962-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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 8C31810FD25; Tue, 20 Oct 2026 04:42:24 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 2454360AE35; Tue, 20 Oct 2026 01:42:23 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1792460540; b=tsJvm4r54lbPtVv3D9ErBFmCxb9hAiLfj6TGVe6uGLXBjWSmURpb0FkSCbw5YqsvZCvm R7v+SoXsGP4z1cp1yMcSTit1VfuE/jaDJQ5tvPY7oyWFeqHyp2hFOQ7YbII+srUt4ro7B /v5T7qjoTLj1DiGJYp+IW9kKjMvAhbGwHMSqyK2kegxtgTlT+loV1izFJfkNhkGqHpc2w 2HqzUmn3nnSzsyJmnAmh9+L+dZaD/lOvJ0gY47mjsfi+mk9J4g+OL7X10siARvPDdH2zU n6kBclVcJWa+cUEwyHfpQKhOmLZwiswOb7OlbYNINn50pHAgijVXarL8L/67KPK1Qvw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792460540; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:In-Reply-To:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=IeEKsGdSAXVlfMgTQC5uSxgWQuW4+3P1rJoZ7NuBRg4=; b=BvspUUdWrINsL99kh3w/6Brtep0jxpS07YvvCX95KzI94Abw11RW8jzvGogFFhERJnMy eeSpGwtqxJvzSne3NFbYPZ0aXHUcfQ0vFYSN8C3PRZGvF+iuSx74ploxOVZL/RRBC4mhi pSQMThUHpND2HPW6+PQOO58RGzvjpCSFM85vKtGDTlqQezgaWf4bXzo06dYuA38stgPkH j+rNxP47Ujog0ALSGE3/lB2gUkoItM8K6dbR4ssnxnoTE/WUzvKEO2iUJGP8X18N2pOvm Z2EyI29V5if4utosDA+FfmaSK29WSOCohSU/dLi25vGd8cIz4sstCKshCb2jlm2jHow== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LIsGx+yo; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 91C68606A320; Tue, 20 Oct 2026 01:42:20 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LIsGx+yo X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792460539; b=kfWbsmFutf+0zDGOjl9w74FOKM472tSS0dN75033uW+kbtds8pDIc/sZ/pQ+qgrDNRg3 jQ04ujHRUKIi+GNnKraFUoa5X6JHCN+oopiAyy+4r7Jn1NCVL9EH1Y0D8Cy2wfAaDquEc 9eBQJfk+/X1mzpJTFnPEYmFd3jzb4aw5D6eY+WEIeWRgyH0S2UeuQIasUHAseIuZwxncw 0nG0nT8QzM/BHkVAzQxpdRXIGEMG0RByStRlNRYRHZAglkSpX6dkbeoNuEkPWgRw3quZV MYUoXVAND/8F+ADyysCp4r7IZfFHgTHHAiX2pOT/HSrA149O2/+ZCnRZcFT+nF6MGSw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792460539; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=IeEKsGdSAXVlfMgTQC5uSxgWQuW4+3P1rJoZ7NuBRg4=; b=GalSAqITsUdElirWqzkMRO9qD2kxKwWMG+93pAOBjBPNNUYRYPHFBOd2p01h7lpiXeUO xq5n8gYDXH7z4b/tFhDE/nWcTALqDGH6X9tAAqd/WDQA+kXyoMBDRbINUOx9stPdz/Ic4 Lw1YEjHMUx8c4EmlFIXSINTopMLMGP2bmBu2VZ66Qox+OqPOCz18c238hhtLCS6OpM9S/ 2QlU16wYW2B6d+bVmAnLhGzcjaFvl3sV9ZvrFHZeCbi1C7/5eCt21GPDvMqq9L0pXzV9j hCyUB2SmwR8goycEkk2Ln1Z1FC2l472wuI6wYuLGVWGrufAg2C27i1QRPxgS+h+p+WA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LIsGx+yo; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50F16606A31A; Tue, 20 Oct 2026 01:42:19 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id B80381F000C4; Tue, 20 Oct 2026 01:42:18 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1792460539; bh=IeEKsGdSAXVlfMgTQC5uSxgWQuW4+3P1rJoZ7NuBRg4=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=LIsGx+yongxSxhGoX75x0Lbgj5bixGtW6gpY8I6F7nxNVFVRQLAQNbgZzC1/K9rUz sU/xzd1pJw9AewhrRYyZBYkrS11T9bmpllLBdkoqorsCMgdcmbAbDHGAFeV4X8QuqR GeOWfUpPncwj7qBq9RJ0pr9c3pR0RlusHfli9H/tElLtcT5JONisdEpF0div3Z4UUX VhE0pvP8Z+BflqVVXvPwZjqEqJQWol5oB11edhACz2PMJrUZEj+HJ5Sxu7P1Q+BZi+ LSSOzo8ZHecrb1cnzQhl/iDIiy8pHWQn4wLYAF/czxW91Ss/YR4eKTSy8BJIcPmJhc xwRDXUVOnifcw== X-Cc: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, Kuniyuki Iwashima <kuniyu@google.com>, Stanislav Fomichev <sdf.kernel@gmail.com>, Hangbin Liu <liuhangbin@gmail.com>, Samiullah Khawaja <skhawaja@google.com>, Neal Cardwell <ncardwell@google.com>, Roman Gushchin <roman.gushchin@linux.dev>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-In-Reply-To: <20261012060152.2930-1-nashuiliang@gmail.com> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list