# Author/Copyright(c): 2009, Thomas Renninger <trenn@suse.de>, Novell Inc.
# Ondemand up_threshold and sampling rate test script for cpufreq-bench # mircobenchmark. # Modify the general variables at the top or extend or copy out parts # if you want to test other things #
# Default with latest kernels is 95, before micro account patches # it was 80, cmp. with git commit 808009131046b62ac434dbc796
UP_THRESHOLD="60 80 95" # Depending on the kernel and the HW sampling rate could be restricted # and cannot be set that low... # E.g. before git commit cef9615a853ebc4972084f7 one could only set # min sampling rate of 80000 if CONFIG_HZ=250
SAMPLING_RATE="20000 80000"
function measure()
{
local -i up_threshold_set
local -i sampling_rate_set
for up_threshold in $UP_THRESHOLD;do for sampling_rate in $SAMPLING_RATE;do # Set values in sysfs echo $up_threshold >/sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold echo $sampling_rate >/sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
up_threshold_set=$(cat /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold)
sampling_rate_set=$(cat /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate)
# Verify set values in sysfs if [ ${up_threshold_set} -eq ${up_threshold} ];then echo"up_threshold: $up_threshold, set in sysfs: ${up_threshold_set}" else echo"WARNING: Tried to set up_threshold: $up_threshold, set in sysfs: ${up_threshold_set}" fi if [ ${sampling_rate_set} -eq ${sampling_rate} ];then echo"sampling_rate: $sampling_rate, set in sysfs: ${sampling_rate_set}" else echo"WARNING: Tried to set sampling_rate: $sampling_rate, set in sysfs: ${sampling_rate_set}" fi
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.