[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aHpf4LfMtB2V9uNb@jlelli-thinkpadt14gen4.remote.csb>
Date: Fri, 18 Jul 2025 16:53:20 +0200
From: Juri Lelli <juri.lelli@...hat.com>
To: Yuri Andriaccio <yurand2000@...il.com>
Cc: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Valentin Schneider <vschneid@...hat.com>,
linux-kernel@...r.kernel.org,
Luca Abeni <luca.abeni@...tannapisa.it>,
Yuri Andriaccio <yuri.andriaccio@...tannapisa.it>
Subject: Re: [BUG] Bw accounting warning on fair-servers' parameters change
On 18/07/25 16:22, Juri Lelli wrote:
> Hi,
>
> Thanks for reporting.
>
> On 18/07/25 13:38, Yuri Andriaccio wrote:
> > Hi,
> >
> > I've been lately working on fair-servers and dl_servers for some patches and
> > I've come across a bandwidth accounting warning on the latest tip/master (as of
> > 2025-07-18, git sha ed0272f0675f). The warning is triggered by simply starting
> > the machine, mounting debugfs and then just zeroing any fair-server's runtime.
> >
> >
> > The warning:
> >
> > WARNING: kernel/sched/deadline.c:266 at dl_rq_change_utilization+0x208/0x230
> > static inline void __sub_rq_bw(u64 dl_bw, struct dl_rq *dl_rq) {
> > ...
> > WARN_ON_ONCE(dl_rq->running_bw > dl_rq->this_bw);
> > }
> >
> > Steps to reproduce:
> >
> > mount -t debugfs none /sys/kernel/debug
> > echo 0 > /sys/kernel/debug/sched/fair_server/cpu0/runtime
> >
> >
> > It does not happen at every machine boot, but happens on most. Could it possibly
> > be related to some of the deadline timers?
>
> I took a quick first look and currently suspect cccb45d7c4295
> ("sched/deadline: Less agressive dl_server handling") could be playing a
> role in this as it delays actual server stop.
>
> Could you please try to repro after having reverted such commit?
After that (w/o the revert), could you please try to see if the
following helps?
---
kernel/sched/debug.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 3f06ab84d53f0..02e16b70a7901 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -376,10 +376,8 @@ static ssize_t sched_fair_server_write(struct file *filp, const char __user *ubu
return -EINVAL;
}
- if (rq->cfs.h_nr_queued) {
- update_rq_clock(rq);
- dl_server_stop(&rq->fair_server);
- }
+ update_rq_clock(rq);
+ dl_server_stop(&rq->fair_server);
retval = dl_server_apply_params(&rq->fair_server, runtime, period, 0);
if (retval)
Powered by blists - more mailing lists