Public bug reported:
[Impact]
Under sustained CPU contention, runnable tasks can receive little or no
runtime when they share a CPU with a busy task in a CPU cgroup. Per-CPU
kernel workers can be affected. Work queued to those workers may then
stop completing, leaving unrelated callers blocked in workqueue flushes
and causing hung-task or RCU stall reports.
This is an EEVDF scheduler regression associated with commit
6d71a9c61604 ("sched/fair: Fix EEVDF entity placement bug causing
scheduling lag"). The problem has a public, standalone reproducer:
https://lore.kernel.org/all/[email protected]/
and has been reverted upstream in commit 101f3498b4bd sched/fair: Revert
6d71a9c61604 ("sched/fair: Fix EEVDF entity placement bug causing
scheduling lag") and it's already applied to resolute:linux (master-
next) via stable updates.
[Fix]
Bring the affected scheduler code in line with upstream, applying the
following commit:
101f3498b4bd sched/fair: Revert 6d71a9c61604 ("sched/fair: Fix EEVDF
entity placement bug causing scheduling lag")
[Test plan]
Run the public cgroup-reweighting reproducer: pin a CPU-intensive task
inside a cgroup and a heartbeat task outside it to the same CPU, then
repeatedly change the cgroup's cpu.weight. Sample the heartbeat task's
/proc/<pid>/schedstat across several intervals. It should continue to
receive runtime, and the test should produce no sustained runnable task
stalls or workqueue lockups.
Build and boot the updated kernels, and exercise CPU contention and
cgroup weight changes on both amd64 and arm64. A short arm64 smoke test
of the patched 6.17 kernel showed continued progress; longer-running
validation under the affected workload is still required.
[Regression potential]
These changes affect EEVDF entity placement and re-weighting in the fair
scheduler. Regressions could appear as changes in CPU share, latency, or
throughput, particularly with CPU cgroups and frequent weight changes.
** Affects: linux-nvidia-7.0 (Ubuntu)
Importance: Undecided
Status: New
** Affects: linux-nvidia-7.0 (Ubuntu Resolute)
Importance: Undecided
Status: New
** Also affects: linux-nvidia-7.0 (Ubuntu Resolute)
Importance: Undecided
Status: New
** Description changed:
[Impact]
- Under sustained CPU contention, a task in a CPU cgroup can cause
- runnable tasks on the same CPU but outside that cgroup to receive little
- or no runtime when the cgroup entity is repeatedly reweighted. Per-CPU
+ Under sustained CPU contention, runnable tasks can receive little or no
+ runtime when they share a CPU with a busy task in a CPU cgroup. Per-CPU
kernel workers can be affected. Work queued to those workers may then
stop completing, leaving unrelated callers blocked in workqueue flushes
and causing hung-task or RCU stall reports.
This is an EEVDF scheduler regression associated with commit
6d71a9c61604 ("sched/fair: Fix EEVDF entity placement bug causing
scheduling lag"). The problem has a public, standalone reproducer:
https://lore.kernel.org/all/[email protected]/
and has been reverted upstream in commit 101f3498b4bd sched/fair: Revert
6d71a9c61604 ("sched/fair: Fix EEVDF entity placement bug causing
scheduling lag") and it's already applied to resolute:linux (master-
next) via stable updates.
[Fix]
Bring the affected scheduler code in line with upstream, applying the
following commit:
- 101f3498b4bd sched/fair: Revert 6d71a9c61604 ("sched/fair: Fix EEVDF
+ 101f3498b4bd sched/fair: Revert 6d71a9c61604 ("sched/fair: Fix EEVDF
entity placement bug causing scheduling lag")
[Test plan]
Run the public cgroup-reweighting reproducer: pin a CPU-intensive task
inside a cgroup and a heartbeat task outside it to the same CPU, then
repeatedly change the cgroup's cpu.weight. Sample the heartbeat task's
/proc/<pid>/schedstat across several intervals. It should continue to
receive runtime, and the test should produce no sustained runnable task
stalls or workqueue lockups.
Build and boot the updated kernels, and exercise CPU contention and
cgroup weight changes on both amd64 and arm64. A short arm64 smoke test
of the patched 6.17 kernel showed continued progress; longer-running
validation under the affected workload is still required.
[Regression potential]
These changes affect EEVDF entity placement and re-weighting in the fair
scheduler. Regressions could appear as changes in CPU share, latency, or
throughput, particularly with CPU cgroups and frequent weight changes.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2170798
Title:
sched/fair: Prevent runnable tasks from starving during cgroup
reweighting
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-7.0/+bug/2170798/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs