All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Steve Muckle <steve.muckle@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: cpufreq governors broken with !CONFIG_SMP?
Date: Fri, 06 May 2016 02:25:16 +0200	[thread overview]
Message-ID: <1953902.drhraqW2It@vostro.rjw.lan> (raw)
In-Reply-To: <1961527.dEtpL4HAvs@vostro.rjw.lan>

On Friday, May 06, 2016 02:09:07 AM Rafael J. Wysocki wrote:
> On Thursday, May 05, 2016 04:49:22 PM Steve Muckle wrote:
> > While working on a few patches for schedutil I noticed that the CFS
> > cpufreq hooks depend on PELT, which depends on CONFIG_SMP.
> > 
> > I compiled and ran a UP kernel with intel_pstate. Running a cpu-bound
> > task did not result in the frequency increasing beyond fmin. For some reason
> > ondemand is working for me with the same test, not sure why yet.
> > 
> > It appears dbs/intel-pstate/schedutil have a dependency on CONFIG_SMP
> > now. Or am I missing something?
> 
> You're right AFAICS.
> 
> For governors other than schedutil fixing that would be a matter of
> adding a !CONFIG_SMP variant of update_load_avg() that will call
> cpufreq_update_util() and do nothing else.  It doesn't matter what
> is passed via util and max then.

Maybe something like the below, FWIW, as a quick fix for 4.6?

---
 kernel/sched/fair.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Index: linux-pm/kernel/sched/fair.c
===================================================================
--- linux-pm.orig/kernel/sched/fair.c
+++ linux-pm/kernel/sched/fair.c
@@ -3030,7 +3030,14 @@ static int idle_balance(struct rq *this_
 
 #else /* CONFIG_SMP */
 
-static inline void update_load_avg(struct sched_entity *se, int update_tg) {}
+static inline void update_load_avg(struct sched_entity *se, int not_used)
+{
+	struct cfs_rq *cfs_rq = cfs_rq_of(se);
+	struct rq *rq = rq_of(cfs_rq);
+
+	cpufreq_trigger_update(rq_clock(rq));
+}
+
 static inline void
 enqueue_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se) {}
 static inline void

  reply	other threads:[~2016-05-06  0:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-05 23:49 cpufreq governors broken with !CONFIG_SMP? Steve Muckle
2016-05-06  0:09 ` Rafael J. Wysocki
2016-05-06  0:25   ` Rafael J. Wysocki [this message]
2016-05-06 11:46     ` Peter Zijlstra
2016-05-06 11:49       ` Rafael J. Wysocki
2016-05-06  0:25   ` Steve Muckle
2016-05-06  0:39     ` Rafael J. Wysocki
2016-05-06 11:49     ` Peter Zijlstra

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=1953902.drhraqW2It@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=steve.muckle@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.