From: Kuniyuki Iwashima <kuniyu@google.com>
To: kerneljasonxing@gmail.com
Cc: davem@davemloft.net, edumazet@google.com, horms@kernel.org,
kuba@kernel.org, netdev@vger.kernel.org, pabeni@redhat.com
Subject: Re: [PATCH net-next] net: add sysctl to toggle napi_consume_skb() alien skb defer
Date: Fri, 27 Mar 2026 14:47:04 +0000 [thread overview]
Message-ID: <20260327144723.3344613-1-kuniyu@google.com> (raw)
In-Reply-To: <CAL+tcoDZx9j_HuzTge3u11_kz8FmEVfw_DMzMRzRd9hv+gjTdA@mail.gmail.com>
From: Jason Xing <kerneljasonxing@gmail.com>
Date: Fri, 27 Mar 2026 18:37:19 +0800
> On Fri, Mar 27, 2026 at 12:21 AM Jason Xing <kerneljasonxing@gmail.com> wrote:
> ...
> > > Seems a copy/paste of proc_do_static_key() ?
> >
> > Thanks, Eric. Much simpler right now:
> > diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
> > index b508618bfc12..a6a1b2c3f8e1 100644
> > --- a/net/core/sysctl_net_core.c
> > +++ b/net/core/sysctl_net_core.c
> > @@ -676,6 +676,16 @@ static struct ctl_table net_core_table[] = {
> > .proc_handler = proc_do_skb_defer_max,
> > .extra1 = SYSCTL_ZERO,
> > },
> > + {
> > + .procname = "napi_consume_skb_defer",
> > + .data = &napi_consume_skb_defer_key.key,
> > + .maxlen = sizeof(napi_consume_skb_defer_key),
> > + .mode = 0644,
> > + .proc_handler = proc_do_static_key,
> > + },
> > };
>
> Eric, when I'm investigating the static key feature, I wonder if we
> can replace some sysctl knob that only carries either 1 or 2 with a
> corresponding static key? The merits are 1) we can minimize the size
> of net.core.xxx or net_hotdata which helps put the structure into one
> cache line, 2) in hot paths, the static key can be more efficient.
>
> Here is the list that I've found so far:
> 1. sysctl_bypass_prot_mem
> 2. sysctl_tstamp_allow_data
> 3. net_hotdata.tstamp_prequeue
> 4. sysctl_tcp_early_demux
> 5. sysctl_ip_early_demux
> 6. sysctl_tcp_l3mdev_accept
> 7. sysctl_tcp_moderate_rcvbuf
> 8. sysctl_tcp_nometrics_save
> 9. sysctl_tcp_no_ssthresh_metrics_save
> 10. sysctl_tcp_dsack
> 11. sysctl_tcp_abort_on_overflow
> 12. sysctl_tcp_slow_start_after_idle
> 13. sysctl_tcp_timestamps
> ...(some other tcp sysctls)...
>
> Some of them can be accessed in multiple places, which means they can
> be hot. Maybe we can try some relatively hot knobs first, like
> sysctl_tcp_timestamps, sysctl_tcp_early_demux...? Do you think it's
> feasible?
Note that a static key is only avaiable for global knobs
while most knobs you mentioned above are per-netns.
next prev parent reply other threads:[~2026-03-27 14:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 14:42 [PATCH net-next] net: add sysctl to toggle napi_consume_skb() alien skb defer Jason Xing
2026-03-26 14:55 ` Eric Dumazet
2026-03-26 16:21 ` Jason Xing
2026-03-27 10:37 ` Jason Xing
2026-03-27 14:47 ` Kuniyuki Iwashima [this message]
2026-03-27 15:29 ` Jason Xing
2026-03-27 4:13 ` Stanislav Fomichev
2026-03-27 8:34 ` Jason Xing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260327144723.3344613-1-kuniyu@google.com \
--to=kuniyu@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kerneljasonxing@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox