On Tuesday, July 28, 2015 12:53:33 PM Pan Xinhui wrote: > 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....@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.
Fix them, then, pretty please. And adding this attribute is not going to magically fix them, is it? Thanks, Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/