[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240529011144.smuq6dbaxvulxy4e@airbuntu>
Date: Wed, 29 May 2024 02:11:44 +0100
From: Qais Yousef <qyousef@...alina.io>
To: Hongyan Xia <hongyan.xia2@....com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Juri Lelli <juri.lelli@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Valentin Schneider <vschneid@...hat.com>,
Christian Loehle <christian.loehle@....com>,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4] sched: Consolidate cpufreq updates
On 05/17/24 12:06, Hongyan Xia wrote:
> > @@ -1997,6 +1999,13 @@ static void __setscheduler_uclamp(struct task_struct *p,
> > uclamp_se_set(&p->uclamp_req[UCLAMP_MAX],
> > attr->sched_util_max, true);
> > }
> > +
> > + /*
> > + * Updating uclamp values has impact on freq, ensure it is taken into
> > + * account.
> > + */
> > + if (task_current(rq, p))
> > + update_cpufreq_ctx_switch(rq, NULL);
>
> Do we care about updating the frequency here? p is dequeued during the
> __setscheduler_uclamp() call, so I think it's better to do this after the
> uclamp() call and after enqueue_task(), so that uclamp_rq_inc() comes into
> effect.
Yes!
> Also, do we want to limit the update to task_current()?
Yes we only care about current because it is running and asking to run faster
so we should honour this immediately.
With this patch we don't do freq updates at enqueue anyway.
Thanks!
--
Qais Yousef
Powered by blists - more mailing lists