From mboxrd@z Thu Jan 1 00:00:00 1970 From: Harry van Haaren Subject: Re: CpuFreq Laptop Scaling broken? Date: Wed, 27 Aug 2014 15:53:52 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: linux-rt-users@vger.kernel.org, Thomas Gleixner , Steven Rostedt , "Rafael J. Wysocki" To: Viresh Kumar Return-path: Received: from mail-la0-f54.google.com ([209.85.215.54]:62695 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933630AbaH0Oxy (ORCPT ); Wed, 27 Aug 2014 10:53:54 -0400 Received: by mail-la0-f54.google.com with SMTP id hz20so43088lab.27 for ; Wed, 27 Aug 2014 07:53:53 -0700 (PDT) In-Reply-To: Sender: linux-rt-users-owner@vger.kernel.org List-ID: On Tue, Aug 26, 2014 at 11:44 PM, Harry van Haaren wrote: > On Tue, Aug 26, 2014 at 5:34 AM, Viresh Kumar wrote: >> The functions of interest would be, drivers/cpufreq/cpufreq.c: >> - static ssize_t show(struct kobject *kobj, struct attribute *attr, char *buf) >> - static ssize_t store_scaling_governor(struct cpufreq_policy *policy, >> const char *buf, size_t count) >> >> Try to add some prints there while returning errors and then try to change >> governor from userspace and things might get somewhat better then.. > > Thanks for the suggestion, I'll update once I have more info Found a little time to check this: the cpufreq_get_policy() call returns non-zero: static ssize_t store_scaling_governor(struct cpufreq_policy *policy, const char *buf, size_t count) { int ret; char str_governor[16]; struct cpufreq_policy new_policy; printk( "RT debug: store_scaling_governor() with %s\n", buf ); ret = cpufreq_get_policy(&new_policy, policy->cpu); if (ret) { printk( "RT debug: ERROR: get policy() returned \n" ); return ret; } dmesg: [ 43.186804] RT debug: store_scaling_governor() with performance [ 43.186811] RT debug: ERROR: get policy() returned This output is from a fresh boot: so it seems that the getting the current policy after a boot isn't functioning right here.