linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pan Xinhui <xinhuix.pan@intel.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"rjw@rjwysocki.net" <rjw@rjwysocki.net>,
	"mnipxh@163.com" <mnipxh@163.com>,
	"yanmin_zhang@linux.intel.com" <yanmin_zhang@linux.intel.com>
Subject: Re: [PATCH] cpufreq: Add scaling frequency range support
Date: Tue, 28 Jul 2015 12:53:33 +0800	[thread overview]
Message-ID: <55B70ACD.9010402@intel.com> (raw)
In-Reply-To: <20150728042945.GE1229@linux>

hi, Viresh
	thanks for your reply :)
On 2015年07月28日 12:29, Viresh Kumar wrote:
> On 28-07-15, 11:32, Pan Xinhui wrote:
>> From: Pan Xinhui <xinhuix.pan@intel.com>
>>
>> Userspace at most time do cpufreq tests very much inconveniently.
>> Currently they have to echo min and max cpu freq separately like below:
>> echo 480000  > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
>> echo 2240000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
>>
>> Add scaling_freq_range cpufreq attr to support userspace's demand.
>> Therefore it's easier for testers to write readable scripts like below: 
>> echo 480000-2240000 >
>> /sys/devices/system/cpu/cpu0/cpufreq/scaling_freq_range
> 
> I don't think this brings any good change, we already have support for
> that with min/max freqs and I don't see how scripts can be less
> readable with that.
> 
yes, min/max are supported, however it is inconvenient. sometime it's very easy to cause obscure bugs.
For example, some one might write a script like below.
echo 480000  > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
.....//other works
echo 1120000  > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 2240000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
...//other works

But it did not work when we echo 112000 to min-freq, as the current max freq is smaller than it.
It's hard to figure it out in a big script... we have many such scripts.
I admit this is a bug in script. If we can support *set freq range*, it's a very good option for usesapce to change the cpufreq.
People working in useespace will be thankful to us :)

> So, why to add redundant files at all? Also note that we can't remove
> the old interface as that will break the ABI.
> 
fully agree! we can't break the ABI. So i just add this feature which is very helpful. :)


thanks
xinhui

  reply	other threads:[~2015-07-28  4:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28  3:32 [PATCH] cpufreq: Add scaling frequency range support Pan Xinhui
2015-07-28  4:29 ` Viresh Kumar
2015-07-28  4:53   ` Pan Xinhui [this message]
2015-07-29  0:18     ` Rafael J. Wysocki
2015-07-29  9:59       ` Pan Xinhui
2015-07-29 10:04         ` Pan Xinhui
2015-07-29 11:01           ` Viresh Kumar
2015-07-29 22:40         ` Rafael J. Wysocki
2015-07-28  5:20 ` Viresh Kumar
2015-07-28  7:02 ` [PATCH V2] " Pan Xinhui
2015-07-28  7:09   ` Viresh Kumar
2015-07-29  0:15 ` [PATCH] " Rafael J. Wysocki

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=55B70ACD.9010402@intel.com \
    --to=xinhuix.pan@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mnipxh@163.com \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@linaro.org \
    --cc=yanmin_zhang@linux.intel.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;
as well as URLs for NNTP newsgroup(s).