Linux Power Management development
 help / color / mirror / Atom feed
From: Qais Yousef <qyousef@layalina.io>
To: Hongyan Xia <hongyan.xia2@arm.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Valentin Schneider <vschneid@redhat.com>,
	Christian Loehle <christian.loehle@arm.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] sched: Consolidate cpufreq updates
Date: Wed, 29 May 2024 02:11:44 +0100	[thread overview]
Message-ID: <20240529011144.smuq6dbaxvulxy4e@airbuntu> (raw)
In-Reply-To: <b4036b48-7d04-4bba-b405-f64ee309e874@arm.com>

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

      reply	other threads:[~2024-05-29  1:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16 20:48 [PATCH v4] sched: Consolidate cpufreq updates Qais Yousef
2024-05-17 11:06 ` Hongyan Xia
2024-05-29  1:11   ` Qais Yousef [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240529011144.smuq6dbaxvulxy4e@airbuntu \
    --to=qyousef@layalina.io \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=christian.loehle@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=hongyan.xia2@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox