From patchwork Fri May 6 00:25:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 9028221 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DB400BF29F for ; Fri, 6 May 2016 00:22:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E603C203ED for ; Fri, 6 May 2016 00:22:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1056B203EB for ; Fri, 6 May 2016 00:22:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753786AbcEFAWE (ORCPT ); Thu, 5 May 2016 20:22:04 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:60211 "HELO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752560AbcEFAWD (ORCPT ); Thu, 5 May 2016 20:22:03 -0400 Received: from 217.96.255.101.ipv4.supernova.orange.pl (217.96.255.101) (HELO vostro.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer v0.80.2) id 2a68ab38e3bba032; Fri, 6 May 2016 02:22:01 +0200 From: "Rafael J. Wysocki" To: Steve Muckle Cc: Peter Zijlstra , 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 Message-ID: <1953902.drhraqW2It@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.5.0-rc1+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1961527.dEtpL4HAvs@vostro.rjw.lan> References: <20160505234922.GA14673@sky.smuckle.net> <1961527.dEtpL4HAvs@vostro.rjw.lan> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,PLING_QUERY, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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