[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aQ2XBQ4vGGFWaykj@jlelli-thinkpadt14gen4.remote.csb>
Date: Fri, 7 Nov 2025 07:51:49 +0100
From: Juri Lelli <juri.lelli@...hat.com>
To: Andrea Righi <arighi@...dia.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>, Tejun Heo <tj@...nel.org>,
David Vernet <void@...ifault.com>,
Changwoo Min <changwoo@...lia.com>, Shuah Khan <shuah@...nel.org>,
Joel Fernandes <joelagnelf@...dia.com>,
Christian Loehle <christian.loehle@....com>,
Emil Tsalapatis <emil@...alapatis.com>,
Luigi De Matteis <ldematteis123@...il.com>,
sched-ext@...ts.linux.dev, bpf@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 02/11] sched/debug: Stop and start server based on if it
was active
On 06/11/25 17:39, Andrea Righi wrote:
> On Thu, Nov 06, 2025 at 08:13:39AM +0100, Juri Lelli wrote:
...
> > > @@ -376,8 +378,11 @@ static ssize_t sched_fair_server_write(struct file *filp, const char __user *ubu
> > > return -EINVAL;
> > > }
> > >
> > > - update_rq_clock(rq);
> > > - dl_server_stop(&rq->fair_server);
> > > + is_active = dl_server_active(&rq->fair_server);
> > > + if (is_active) {
> > > + update_rq_clock(rq);
> > > + dl_server_stop(&rq->fair_server);
> > > + }
> > >
> > > retval = dl_server_apply_params(&rq->fair_server, runtime, period, 0);
> > >
> > > @@ -385,7 +390,7 @@ static ssize_t sched_fair_server_write(struct file *filp, const char __user *ubu
> > > printk_deferred("Fair server disabled in CPU %d, system may crash due to starvation.\n",
> > > cpu_of(rq));
> > >
> > > - if (rq->cfs.h_nr_queued)
> > > + if (is_active)
> > > dl_server_start(&rq->fair_server);
> >
> > Something that I noticed while reviewing this series is that we still
> > start back a server even if the user put its runtime to zero (disabling
> > it) and I don't think we want to do that. It's not of course related to
> > this change or this series per-se, but something we probably want to fix
> > independently.
>
> Should we just call dl_server_remove_params() when runtime is zero?
Looking again at it I actually wonder if wouldn't it be better to use
dl_server_apply_params(dl_se, 0, dl_se->dl_period, false) in both cases.
dl_rq_change_utilization() deals with dl_non_contending (inactive_timer
armed) case already (even though sub-optimally, but we can fix/change it
later), so we can probably remove the special handling you do in
dl_server_remove_params(). The WARN_ON_ONCE(on_dl_rq()) could be moved
to dl_server_apply_params() as well.
What do you think?
Powered by blists - more mailing lists