From: Junjie Cao <junjie.cao@intel.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Vinicius Costa Gomes <vinicius.gomes@intel.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
Jiri Pirko <jiri@resnulli.us>, Weiming Shi <bestswngs@gmail.com>,
Shuah Khan <shuah@kernel.org>, Simon Horman <horms@kernel.org>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Hillf Danton <hdanton@sina.com>,
Uladzislau Zhauniarovich <uladzislau.zhauniarovich@gmail.com>,
syzbot+19d01f6082ec61dd45b2@syzkaller.appspotmail.com,
syzbot+8785aaf121cfb2141e0d@syzkaller.appspotmail.com,
syzbot+2642f347f7309b4880dc@syzkaller.appspotmail.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: [PATCH net 0/3] net/sched: taprio: fix software schedule livelocks
Date: Tue, 18 Aug 2026 15:17:03 +0800 [thread overview]
Message-ID: <20260818071706.251035-1-junjie.cao@intel.com> (raw)
advance_sched() livelocks the owning CPU in two independent ways:
schedules with entry intervals below the cost of servicing one hrtimer
expiry pass validation, because virtual devices inflate the link speed
behind the frame-length minimum, and a valid schedule that falls
behind - delayed timer, starved CPU, stepped clock - replays its whole
backlog one entry per expiry from hrtimer context.
Neither fix covers the other case. With only bounded catch-up, a 700ns
single-entry schedule on veth is still admitted and sustains ~1M timer
irqs/s on a release build. With only the interval floor, a stepped
clock still replays the backlog. Clamping the next expiry into the
future at runtime, as tested on one of the reproducer buckets in 2025
[1], keeps the stall detector quiet but leaves the sub-microsecond
schedule admitted, the CPU servicing an expiry every few microseconds
for the lifetime of the qdisc, and the gates drifting off the
configured timeline with every clamped expiry.
Patch 2 extends the patch generated by syzkaller's patching workflow
[2] to exempt txtime-assist, which never arms the per-entry hrtimer.
syzbot tested the series against the reproducers of all three known
buckets on net.git; tags on patch 2.
[1] https://lore.kernel.org/all/20250729010657.3326-1-hdanton@sina.com/
[2] https://lore.kernel.org/all/afe041f6-ef7d-4434-b2d0-096be49b5bcb@mail.kernel.org/
Junjie Cao (2):
net/sched: taprio: catch up in bounded time when the schedule falls
behind
selftests/tc-testing: taprio: add case for the software minimum
interval
Uladzislau Zhauniarovich (1):
net/sched: taprio: enforce a minimum interval for software schedules
net/sched/sch_taprio.c | 80 +++++++++++++++++--
.../tc-testing/tc-tests/qdiscs/taprio.json | 22 +++++
2 files changed, 97 insertions(+), 5 deletions(-)
--
2.43.0
next reply other threads:[~2026-08-18 7:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 7:17 Junjie Cao [this message]
2026-08-18 7:17 ` [PATCH net 1/3] net/sched: taprio: catch up in bounded time when the schedule falls behind Junjie Cao
2026-08-18 7:17 ` [PATCH net 2/3] net/sched: taprio: enforce a minimum interval for software schedules Junjie Cao
2026-08-18 7:17 ` [PATCH net 3/3] selftests/tc-testing: taprio: add case for the software minimum interval Junjie Cao
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=20260818071706.251035-1-junjie.cao@intel.com \
--to=junjie.cao@intel.com \
--cc=bestswngs@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hdanton@sina.com \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=syzbot+19d01f6082ec61dd45b2@syzkaller.appspotmail.com \
--cc=syzbot+2642f347f7309b4880dc@syzkaller.appspotmail.com \
--cc=syzbot+8785aaf121cfb2141e0d@syzkaller.appspotmail.com \
--cc=uladzislau.zhauniarovich@gmail.com \
--cc=vinicius.gomes@intel.com \
--cc=vladimir.oltean@nxp.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