All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/3] net/sched: taprio: fix software schedule livelocks
@ 2026-08-18  7:17 Junjie Cao
  2026-08-18  7:17 ` [PATCH net 1/3] net/sched: taprio: catch up in bounded time when the schedule falls behind Junjie Cao
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Junjie Cao @ 2026-08-18  7:17 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Vinicius Costa Gomes
  Cc: Jamal Hadi Salim, Jiri Pirko, Weiming Shi, Shuah Khan,
	Simon Horman, Vladimir Oltean, Hillf Danton,
	Uladzislau Zhauniarovich, syzbot+19d01f6082ec61dd45b2,
	syzbot+8785aaf121cfb2141e0d, syzbot+2642f347f7309b4880dc, netdev,
	linux-kernel, linux-kselftest

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-08-20  2:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18  7:17 [PATCH net 0/3] net/sched: taprio: fix software schedule livelocks Junjie Cao
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-19  7:50   ` Hillf Danton
2026-08-20  2:25     ` 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

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.