[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250630141118.GA2427040@joelnvbox>
Date: Mon, 30 Jun 2025 10:11:18 -0400
From: Joel Fernandes <joelagnelf@...dia.com>
To: Tejun Heo <tj@...nel.org>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
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>,
David Vernet <void@...ifault.com>, Andrea Righi <arighi@...dia.com>,
Changwoo Min <changwoo@...lia.com>
Subject: Re: [PATCH v5 02/14] sched/debug: Stop and start server based on if
it was active
On Mon, Jun 23, 2025 at 10:16:53 -1000, Tejun Heo wrote:
> On Fri, Jun 20, 2025 at 04:32:17PM -0400, Joel Fernandes wrote:
> > @@ -381,7 +382,8 @@ static ssize_t sched_fair_server_write(struct file *filp, const char __user *ubu
> > return -EINVAL;
> > }
> >
> > - if (rq->cfs.h_nr_queued) {
> > + if (dl_server_active(&rq->fair_server)) {
> > + was_active = true;
> > update_rq_clock(rq);
> > dl_server_stop(&rq->fair_server);
> > }
> > @@ -392,7 +394,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 (was_active)
>
> This is minor but the style looks a bit odd to me. Would it make more sense
> to put was_active in the scoped_guard block and do something like:
>
> is_active = dl_server_active(&rq->fair_server);
> if (is_active) {
> ...
> }
> ...
> if (is_active)
> dl_server_start(&rq->fair_server);
I agree, I will make this change.
> Other than that,
>
> Acked-by: Tejun Heo <tj@...nel.org>
thanks!
- Joel
Powered by blists - more mailing lists