Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754381AbbG1E4E (ORCPT ); Tue, 28 Jul 2015 00:56:04 -0400 Received: from mga02.intel.com ([134.134.136.20]:31721 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751632AbbG1E4B (ORCPT ); Tue, 28 Jul 2015 00:56:01 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,560,1432623600"; d="scan'208";a="771162215" Message-ID: <55B70ACD.9010402@intel.com> Date: Tue, 28 Jul 2015 12:53:33 +0800 From: Pan Xinhui User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Viresh Kumar CC: "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" , "rjw@rjwysocki.net" , "mnipxh@163.com" , "yanmin_zhang@linux.intel.com" Subject: Re: [PATCH] cpufreq: Add scaling frequency range support References: <55B6F7C3.8040405@intel.com> <20150728042945.GE1229@linux> In-Reply-To: <20150728042945.GE1229@linux> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2159 Lines: 47 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 >> >> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/