Bug 616976 - cpuspeed does not reset MIN/MAX values when config file is emptied
cpuspeed does not reset MIN/MAX values when config file is emptied
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cpuspeed (Show other bugs)
6.0
All Linux
low Severity medium
: beta
: ---
Assigned To: Petr Šabata
John Brier
: Patch, RHELNAK
Depends On:
Blocks: 767187 836169
  Show dependency treegraph
 
Reported: 2010-07-21 16:58 EDT by François Cami
Modified: 2013-08-14 19:05 EDT (History)
5 users (show)

See Also:
Fixed In Version: cpuspeed-1.5-17.el6
Doc Type: Bug Fix
Doc Text:
Cause: The cpuspeed does not reset MIN/MAX values, when config file is emptied. Consequence: The MIN_SPEED or MAX_SPEED values weren't reset properly. Fix: Conditionals in init script were added to check these values. Result: The MIN_SPEED or MAX_SPEED values are reset properly.
Story Points: ---
Clone Of: 616507
Environment:
Last Closed: 2012-10-25 09:10:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch for /etc/init.d/cpuspeed (566 bytes, patch)
2010-07-21 16:58 EDT, François Cami
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:1404 normal SHIPPED_LIVE cpuspeed bug fix update 2012-10-25 13:08:38 EDT

  None (edit)
Description François Cami 2010-07-21 16:58:01 EDT
+++ This bug was initially created as a clone of Bug #616507 +++

Created an attachment (id=433207)
patch for /etc/init.d/cpuspeed

Description of problem:
When MIN_SPEED (resp. MAX_SPEED) is set in /etc/sysconfig/cpuspeed, and then removed, /etc/init.d/cpuspeed does not reset the value to the CPU minimum (resp. maximum) frequency.

Version-Release number of selected component (if applicable):
cpuspeed-1.5-13.fc13.x86_64

How reproducible:
Always

Steps to Reproduce:
0. check CPU frequency using cat /proc/cpuinfo
1. Set MIN_SPEED in /etc/sysconfig/cpuspeed to a suitable value superior to the CPU's minimum frequency
2. restart cpuspeed
3. Unset MIN_SPEED (restore configuration file)
4. restart cpuspeed
5. check CPU frequency using cat /proc/cpuinfo
  
Actual results:
CPU frequency in step 5 is equal to the MIN_SPEED set at step 1.

Expected results:
CPU frequency in steps 0 and 5 are identical.

Additional info:
This is because the cpuspeed script does not reset the values when the {MIN_SPEED,MAX_SPEED} variables are empty. A (crude) patch to do that is attached.

--- Additional comment from updates@fedoraproject.org on 2010-07-21 08:11:29 EDT ---

cpuspeed-1.5-14.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/cpuspeed-1.5-14.fc13

--- Additional comment from psabata@redhat.com on 2010-07-21 08:18:13 EDT ---

Thank you for the patch.
This should now be fixed in 1:1.5-14 in both Fedora 13 and Rawhide.
Comment 1 François Cami 2010-07-21 16:58:56 EDT
Created attachment 433500 [details]
patch for /etc/init.d/cpuspeed
Comment 3 RHEL Product and Program Management 2010-07-21 17:18:17 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 4 RHEL Product and Program Management 2011-01-07 10:35:42 EST
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.
Comment 13 John Brier 2012-10-02 15:00:41 EDT
fyi, reproduced only while using ondemand, could not reproduce with userspace governor:

[root@server cpuspeed-1.5-17.el6.x86_64.rpm-dir]# grep MHz /proc/cpuinfo 
cpu MHz		: 1400.000
cpu MHz		: 1400.000
cpu MHz		: 1400.000
cpu MHz		: 1400.000

[root@server cpuspeed-1.5-17.el6.x86_64.rpm-dir]# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies 
3700000 3300000 2900000 2400000 1900000 1400000 
[root@server cpuspeed-1.5-17.el6.x86_64.rpm-dir]# vim /etc/sysconfig/cpuspeed 
[root@server cpuspeed-1.5-17.el6.x86_64.rpm-dir]# service cpuspeed restart
Disabling ondemand cpu frequency scaling:                  [  OK  ]
Enabling ondemand cpu frequency scaling:                   [  OK  ]
[root@server cpuspeed-1.5-17.el6.x86_64.rpm-dir]# tail /var/log/messages
<snip unrelated messages>
Oct  2 13:02:50 server cpuspeed: Enabling userspace cpu frequency scaling governor
Oct  2 13:03:20 server cpuspeed: Enabling userspace cpu frequency scaling governor
Oct  2 14:43:06 server cpuspeed: Enabling ondemand cpu frequency scaling governor
Oct  2 14:43:06 server kernel: CPUFREQ: Per core ondemand sysfs interface is deprecated - ignore_nice_load
Oct  2 14:49:21 server cpuspeed: Disabling ondemand cpu frequency scaling governor
Oct  2 14:49:21 server cpuspeed: Enabling ondemand cpu frequency scaling governor
Oct  2 14:49:21 server kernel: CPUFREQ: Per core ondemand sysfs interface is deprecated - ignore_nice_load


[root@server cpuspeed-1.5-17.el6.x86_64.rpm-dir]# grep MHz /proc/cpuinfo 
cpu MHz		: 1900.000
cpu MHz		: 1900.000
cpu MHz		: 1900.000
cpu MHz		: 1900.000
[root@server cpuspeed-1.5-17.el6.x86_64.rpm-dir]# vim /etc/sysconfig/cpuspeed 
[root@server cpuspeed-1.5-17.el6.x86_64.rpm-dir]# service cpuspeed restart
Disabling ondemand cpu frequency scaling:                  [  OK  ]
Enabling ondemand cpu frequency scaling:                   [  OK  ]
[root@server cpuspeed-1.5-17.el6.x86_64.rpm-dir]# vim /etc/sysconfig/cpuspeed 
[root@server cpuspeed-1.5-17.el6.x86_64.rpm-dir]# !grep
grep MHz /proc/cpuinfo 
cpu MHz		: 1900.000
cpu MHz		: 1900.000
cpu MHz		: 1900.000
cpu MHz		: 1900.000
[root@server cpuspeed-1.5-17.el6.x86_64.rpm-dir]# rpm -q cpuspeed
cpuspeed-1.5-15.el6.x86_64
[root@server cpuspeed-1.5-17.el6.x86_64.rpm-dir]# grep _SPEED /etc/sysconfig/cpuspeed 
MAX_SPEED=
MIN_SPEED=
[root@server cpuspeed-1.5-17.el6.x86_64.rpm-dir]# 

VERIFIED:

[root@server cpuspeed-1.5-17.el6.x86_64.rpm-dir]# cd
[root@server ~]# rpm -Uvh cpuspeed-1.5-17.el6.x86_64.rpm
Preparing...                ########################################### [100%]
   1:cpuspeed               ########################################### [100%]
[root@server ~]# vim /etc/sysconfig/cpuspeed 
[root@server ~]# !grep
grep _SPEED /etc/sysconfig/cpuspeed 
MAX_SPEED=
MIN_SPEED=
[root@server ~]# grep MHz /proc/cpuinfo 
cpu MHz		: 1900.000
cpu MHz		: 1900.000
cpu MHz		: 1900.000
cpu MHz		: 1900.000
[root@server ~]# service cpuspeed restart
Disabling ondemand cpu frequency scaling:                  [  OK  ]
Enabling ondemand cpu frequency scaling:                   [  OK  ]
[root@server ~]# grep MHz /proc/cpuinfo 
cpu MHz		: 1400.000
cpu MHz		: 1400.000
cpu MHz		: 1400.000
cpu MHz		: 1400.000
[root@server ~]#
Comment 16 errata-xmlrpc 2012-10-25 09:10:40 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-1404.html

Note You need to log in before you can comment on or make changes to this bug.