[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250209224103.gcvli5zbdx67d4ad@airbuntu>
Date: Sun, 9 Feb 2025 22:41:03 +0000
From: Qais Yousef <qyousef@...alina.io>
To: Christian Loehle <christian.loehle@....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>,
Valentin Schneider <vschneid@...hat.com>,
Hongyan Xia <hongyan.xia2@....com>,
John Stultz <jstultz@...gle.com>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7] sched: Consolidate cpufreq updates
On 10/11/24 10:34, Christian Loehle wrote:
> > @@ -796,7 +802,8 @@ int __sched_setscheduler(struct task_struct *p,
> > __setscheduler_params(p, attr);
> > __setscheduler_prio(p, newprio);
> > }
> > - __setscheduler_uclamp(p, attr);
> > +
> > + update_cpufreq = __setscheduler_uclamp(p, attr);
> >
> > if (queued) {
> > /*
> > @@ -811,7 +818,18 @@ int __sched_setscheduler(struct task_struct *p,
> > if (running)
> > set_next_task(rq, p);
> >
> > - check_class_changed(rq, p, prev_class, oldprio);
> > + update_cpufreq |= check_class_changed(rq, p, prev_class, oldprio);
> > +
> > + /*
> > + * Changing class or uclamp value implies requiring to send cpufreq
> > + * update.
> > + */
> > + if (update_cpufreq) {
> > + if (running)
> > + update_cpufreq_current(rq);
> > + else if (queued)
> > + cpufreq_update_util(rq, SCHED_CPUFREQ_TASK_ENQUEUED);
> > + }
>
> cpufreq_update_util() -> sugov_should_update_freq() -> cpufreq_this_cpu_can_update()
> relies on smp_processor_id(), should this move this below the
> preempt_disable() to avoid sending an update from an illegal CPU?
We are holding the task_rq_lock() with interrupts disabled, we should be okay
no?
Did you see an actual warning from LOCKDEP?
Powered by blists - more mailing lists