🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #23473

Re: [PATCH net v4 2/3] net/sched: act_gate: refuse schedule entries shorter than 10 us

#23473
From: Matthieu Baerts
Date: Fri, 27 Nov 2026 10:14
64 lines
14023 bytes
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
Technical Details
Message-ID: <398670d0-809d-4cdc-b03f-80bc3b5faa2a@kernel.org>
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372648-linux-kernel-netdev=dewy.ru
References: <ACT-WEXM.v4.r0.20261124074514@mojatatu.com> <ACT-WEXM.v4.r0.20261124074514-2@mojatatu.com> <20261124161258.vLyrm8Y4@linutronix.de> <CAM0EoMmMio4kotBqbcJmFtf_c3Du=rhfvp+sMiAd0fHKowv6Vg@mail.gmail.com> <CAM0EoMkEjxCo6K9k3MZH0U+3na9soMNE0gouddwOTzUYXcEunA@mail.gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372648-linux-kernel-netdev=dewy.ru
From: matttbe@kernel.org (Matthieu Baerts)
Newsgroups: linux.kernel.netdev
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
Organization: Usenet Network
Message-ID: <398670d0-809d-4cdc-b03f-80bc3b5faa2a@kernel.org>
References: <ACT-WEXM.v4.r0.20261124074514@mojatatu.com>
 <ACT-WEXM.v4.r0.20261124074514-2@mojatatu.com>
 <20261124161258.vLyrm8Y4@linutronix.de>
 <CAM0EoMmMio4kotBqbcJmFtf_c3Du=rhfvp+sMiAd0fHKowv6Vg@mail.gmail.com>
 <CAM0EoMkEjxCo6K9k3MZH0U+3na9soMNE0gouddwOTzUYXcEunA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="705527"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:LsYXJAt/B+My4SnZbe2cwIk7AVo= sha256:ViEdr07Jjr+7EN7Z4UAguDo44y8yNoqSeFIGmy+aepw=
	sha1:WsDgxPgdOVXjKP8S429Jn6b3cDA= sha256:XLJkxbVYfHBamfnAVwAXDRgbi5RVYZn1CD6MBgEALl8=
Content-Language: fr
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 44F06125F4E; Fri, 27 Nov 2026 13:18:09 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.501
X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.001, 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]
	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 54JPfHdCRAWl;
	Fri, 27 Nov 2026 13:18:06 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-372648-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id CE056125F48; Fri, 27 Nov 2026 13:17:57 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 1116338C27; Fri, 27 Nov 2026 10:16:25 +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=1795774503;
	b=2Gvx0z1ae//tGnf/NFj1o+5DSZHHOADj6LC/3EHU9ZQyycFBjK6YDhIaOYfs3Pa+1gRC
	 KMB/WrG9WSUcPstTLAdkTHC6N5v/QKjVpCUnrKiaN1ZUP8IOPfuXOV2alB/WZVRtofyLp
	 xxufMORe8jSTJmmtmHac/8alPz/Nt6q6/WcMHSjQFrOHUQG5stFooTKqV4/mDCB0c7eXk
	 9FeAElBfaSCHbGIvcC0pr1KTkY4ap7DHrHmuSid8kwszDLmJ/ABHZ1kre+k4AMWSLejvF
	 a+1bn4Yr8F54fh+2bLT1ZwVHE46TqvSM2wA6SDwkgf2JLDmz8jYC35MXQ7imQojx74w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795774503;
	h=X-Original-To:Received:Received:DKIM-Signature:Message-ID:Date:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent:
	 Subject:Content-Language:To:Cc:References:From:Autocrypt:Organization:
	 In-Reply-To:Content-Type:Content-Transfer-Encoding;
	bh=gfAz+igUaZQtqJ8U5CAAvNBQ49KsairTBI4/qgGsxOM=;
	b=Udi6GAvDoU6zRi7dISmeCGDu6Y5qQtzf0a76nrsXv/HT7XanOur2v8ByFOgGeRrQgk0J
	 Vaiff+WWaIacz6VxB3kqP02mc7+cy13KlGpBVciVenKwEHyml6b6o7barOSqe4bRjpH3m
	 UDJ7HjND947QM28kP+rs+a1FQr3SZ9pZsTm9Kub4HwJJPRw8NYEdsRCHM9+WuKA3gvQeh
	 On+apn0w0N0GK5hjpsT1Edfra8t3HafiKloNsq2NaRNI0fPtMPgdzXiU4Fjzt1DYAga2o
	 HNd2lRgX1Zr1Z8I84dXnHlaIHi+pUXJxoUoTk1oDwdn5YqH3J6vphD6YpWWTAb3T8+A==
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=Jk6uF4BV;
	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 3F451606A339;
	Fri, 27 Nov 2026 10:15:03 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Jk6uF4BV
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=1795774492;
	b=odQCh8l3iyBIASPPdD0gTEawxOroiSjhSYRRUeBkXR2XJMzzbjeqmsaIXuT/Km5kqqIX
	 NnsvCMh7l6A9S+GJ5WzIJpjdO1/39UoxqxhA5+cdmFuur5tX4S3AU0BAXQw9iZqmZdiln
	 MIgsa5ZnkrZ9uAHhmwj51YctLuIhia/xsU5PImDM7XTNE5SKUUSzzM+l35a4DxdOKsZro
	 TaX0M4/GfsT4DmER7gEKG12FAsIMW9yujgdvrLpRNuRSV0vvTiYyGJ9a6e30yjaMZbznL
	 zw5+LjOVOCiqFuSbvOga1qHJ/9IM0IFSiKQYffEv7xTsLbcDzNmfBFkLBdILtG2Ed0A==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795774492;
	h=Received:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent:
	 Subject:Content-Language:To:Cc:References:From:Autocrypt:Organization:
	 In-Reply-To:Content-Type:Content-Transfer-Encoding;
	bh=gfAz+igUaZQtqJ8U5CAAvNBQ49KsairTBI4/qgGsxOM=;
	b=BGv/lrJ1Xs3o+au9dOyyAA/Y1PUKWFh7X+jIdZcCXfD/Y6IfyZoHvGyRUqob5qF5p13R
	 X8CiXY/SPf3YYtMTH74+n3Ax511W8qarPCqVfjZFim8HzVK+8gPI2BCeEWo53trm9GwQz
	 u/beGWUoF0YWwgrq4/zQ+VoKKd7pp1oFezSdH8A/87r8FwFwSXIpbRsMq5HjZIXz0xg2l
	 jk4Qg+LxhB3R3s+JeLv97YzP1YvZQvyzHT1yAy4PcRc+n0/wqjo3uCNnbfFBIXxIuPp3P
	 gcMV5WViKP6+LS7UcEeKX0XnwMZSimHbU8HH9nLCSB3kA9wNGkzgWgjhpYRWzl8F6GQ==
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=Jk6uF4BV;
	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 5CD3D60A260C;
	Fri, 27 Nov 2026 10:14:52 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86E951F0089A;
	Fri, 27 Nov 2026 10:14:48 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795774491;
	bh=gfAz+igUaZQtqJ8U5CAAvNBQ49KsairTBI4/qgGsxOM=;
	h=Date:Subject:To:Cc:References:From:In-Reply-To;
	b=Jk6uF4BVYxjpa7BcdvmvYO0JVlWJ7Aw+egsP7dUBAgWLZ60e6KchWnkoopl8FLOVJ
	 GxRJ021z8UCTo+6fv8LCv4iqLRMxFHVEqCNwNTp6dCgG87r6gy0PwbLWwA/Xkd3/4N
	 DWc2vfR7xkrqVaR0163e6i8NKA3f/eSkVI2kiIFf3XIlEGFK2rJb+4RrBL7XkaYVis
	 QeNqtXgW257auKS8pXzNeQxa+nXikiid1YHZdL6aLi18uI+6hpHhdyP57N+cLR67ty
	 sNfQIEZy6f6HUwojT6VaI4ri8G7N6SXk0VDNoeU52NbTR12ejOq5aPGiYaM3hg/Wpt
	 92vc15IHZ3BxQ==
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
X-User-Agent: Mozilla Thunderbird Beta
X-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
X-Aut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