From: Matthieu Baerts <matttbe@kernel.org>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
netdev@vger.kernel.org, Jiri Pirko <jiri@resnulli.us>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Willem de Bruijn <willemb@google.com>,
Simon Horman <horms@kernel.org>,
Clark Williams <clrkwllms@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
linux-rt-devel@lists.linux.dev,
Victor Nogueira <victor@mojatatu.com>, Po Liu <Po.Liu@nxp.com>,
stable@vger.kernel.org, sashiko-bot@kernel.org
Subject: Re: [PATCH net v4 2/3] net/sched: act_gate: refuse schedule entries shorter than 10 us
Date: Fri, 27 Nov 2026 11:14:45 +0100 [thread overview]
Message-ID: <398670d0-809d-4cdc-b03f-80bc3b5faa2a@kernel.org> (raw)
In-Reply-To: <CAM0EoMkEjxCo6K9k3MZH0U+3na9soMNE0gouddwOTzUYXcEunA@mail.gmail.com>
Hi Jamal,
On 24/11/2026 18:11, Jamal Hadi Salim wrote:
> On Tue, Nov 24, 2026 at 11:58 AM Jamal Hadi Salim <jhs@mojatatu.com> wrote:
>>
>> On Tue, Nov 24, 2026 at 11:13 AM Sebastian Andrzej Siewior
>> <bigeasy@linutronix.de> wrote:
>>>
>>> On 2026-11-24 09:12:09 [-0500], Jamal Hadi Salim wrote:
>>>> This is a followup of commit a51c328df310 ("net: qos: introduce a gate
>>>> control flow action") as reported by Sashiko.
>>>>
>>>> The issue:
>>>> fill_gate_entry() only rejects an interval of zero, but that interval is
>>>> the period gate_timer_func() re-arms the hrtimer at, and a few
>>>> nanoseconds is below the cost of servicing one expiry: the next is due
>>>> before the current one finishes, so the action holds a CPU in the timer
>>>> softirq for as long as it exists.
>>>
>>> The timer is programmed in the past, fires immediately and hogs the
>>> CPU.
>>>
>>>> On a 2-vCPU guest, entries of 1 us and below hold 86% to 90% of a core,
>>>> 2 us holds 61%, and 3 us holds 22%; from 3.5 us on the cost falls to a
>>>> few percent and it reaches zero by 100 us.
>>>>
>>>> The Fix:
>>>> Require at least 10 us per entry. An act_gate schedule is not tied to a
>>>> device, so unlike taprio there is no frame time to derive a bound from;
>>>> the bound has to come from the cost of servicing one expiry, with room
>>>> for a kernel that services it slower.
>>>
>>> The 10us sound sane. With enough debug (say kasan, lockdep, …) this
>>> might become tight again.
>>>
>>
>> Agreed. Unfortunately, there is no way to derive a "good value" here
>> (it depends on workload, machine, utilization, etc, etc).
>> poor choice of wording on my part - should probably have said all of
>> what i said above for precisiness...
>
> And now that you bring this up - this should really have been
> targetting net-next not net.
> I dont want to resend (unless sashikos find something sinister) - but
> Jakub/Paolo consider applying this to net-next instead when the time
> comes.
I'm sorry to say that, but a new version might be needed: it looks like
the new tests you added in this series are not passing:
https://github.com/p4tc-dev/tc-executor/blob/storage/artifacts/928799/1-tdc-sh/stdout
It started there:
https://netdev.bots.linux.dev/branch_deltas/net-next-2026-11-26--21-00.html
Or is it due to conflicts with other WIP patches or something missing on
the CI?
pw-bot: cr
Cheers,
Matt
next prev parent reply other threads:[~2026-11-27 10:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 14:12 [PATCH net v4 0/3] net/sched: act_gate: bound the cycle time and refuse schedule entries shorter than 10 us Jamal Hadi Salim
2026-11-24 14:12 ` [PATCH net v4 1/3] net/sched: act_gate: bound the cycle time and start time arithmetic Jamal Hadi Salim
2026-11-24 19:56 ` Alexei Starovoitov
2026-11-24 23:31 ` Jamal Hadi Salim
2026-11-24 23:38 ` Alexei Starovoitov
2026-11-25 14:15 ` netdev-bot+sashiko
2026-11-24 14:12 ` [PATCH net v4 2/3] net/sched: act_gate: refuse schedule entries shorter than 10 us Jamal Hadi Salim
2026-11-24 16:12 ` Sebastian Andrzej Siewior
2026-11-24 16:58 ` Jamal Hadi Salim
2026-11-24 17:11 ` Jamal Hadi Salim
2026-11-27 10:14 ` Matthieu Baerts [this message]
2026-11-27 10:16 ` Jamal Hadi Salim
2026-11-25 14:15 ` netdev-bot+sashiko
2026-11-27 11:39 ` Jamal Hadi Salim
2026-11-24 14:12 ` [PATCH net v4 3/3] selftests: tc-testing: act_gate: cover the new cycle time and interval limits Jamal Hadi Salim
2026-11-25 14:15 ` netdev-bot+sashiko
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=398670d0-809d-4cdc-b03f-80bc3b5faa2a@kernel.org \
--to=matttbe@kernel.org \
--cc=Po.Liu@nxp.com \
--cc=bigeasy@linutronix.de \
--cc=clrkwllms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rostedt@goodmis.org \
--cc=sashiko-bot@kernel.org \
--cc=stable@vger.kernel.org \
--cc=victor@mojatatu.com \
--cc=willemb@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.