rpms/cpuspeed/devel idlenice.diff, NONE, 1.1 cpuspeed.spec, 1.19, 1.20 cpuspeed-smp.patch, 1.1, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Apr 6 18:32:30 UTC 2005
Update of /cvs/dist/rpms/cpuspeed/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv6362
Modified Files:
cpuspeed.spec
Added Files:
idlenice.diff
Removed Files:
cpuspeed-smp.patch
Log Message:
dont count nice time as idle time
idlenice.diff:
cpuspeed.cc | 14 ++++++++++++--
cpuspeed.conf | 3 +++
2 files changed, 15 insertions(+), 2 deletions(-)
--- NEW FILE idlenice.diff ---
--- ./cpuspeed-1.2.1/cpuspeed.cc~ 2005-04-06 15:04:28.000000000 -0300
+++ ./cpuspeed-1.2.1/cpuspeed.cc 2005-04-06 15:12:55.000000000 -0300
@@ -122,6 +122,9 @@
unsigned current_speed; // current speed step
unsigned last_step; // lowest speed step
+// whether to account nice time as user time (true) or idle time (false)
+bool include_nice = false;
+
// which CPU are we controlling
unsigned cpu = 0;
@@ -324,8 +327,10 @@
&system_time, &idle_time, &wait_time
);
- // count nice time as idle time
- idle_time += nice_time;
+ if (!include_nice)
+ idle_time += nice_time;
+ else
+ user_time += nice_time;
// count IO wait time as idle time
idle_time += wait_time;
@@ -598,6 +603,8 @@
fprintf(stderr, "CPU interval is %u\n", interval);
#endif
}
+ else if(!strcmp(argv[i], "-n"))
+ include_nice = true;
else if(!strcmp(argv[i], "-p"))
{
if (argc <= i + 2)
@@ -708,6 +715,9 @@
" Sets the interval between idle percentage tests and possible speed\n"
" changes in tenths of a second (default is 20).\n"
"\n"
+ " -n\n"
+ " Includes nice time as cpu time (off by default)\n"
+ "\n"
" -p <fast up> <threshold>\n"
" Sets the CPU idle percentage thresholds. <fast up> is the idle\n"
" percentage below which a CPU will be set to the highest possible\n"
--- ./cpuspeed-1.2.1/cpuspeed.conf~ 2005-04-06 15:11:46.000000000 -0300
+++ ./cpuspeed-1.2.1/cpuspeed.conf 2005-04-06 15:11:52.000000000 -0300
@@ -4,6 +4,9 @@
# uncomment this and set to the name of your CPUFreq module
#DRIVER="powernow-k7"
+# Let background (nice) processes speed up the cpu
+OPTS="$OPTS -n"
+
# Add your favorite options here
#OPTS="$OPTS -s 0 -i 10 -r"
Index: cpuspeed.spec
===================================================================
RCS file: /cvs/dist/rpms/cpuspeed/devel/cpuspeed.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- cpuspeed.spec 2 Mar 2005 03:48:11 -0000 1.19
+++ cpuspeed.spec 6 Apr 2005 18:32:28 -0000 1.20
@@ -14,6 +14,7 @@
Obsoletes: kernel-utils
Patch1: warning.diff
+Patch2: idlenice.diff
%description
cpuspeed is a daemon that dynamically changes the speed
@@ -25,6 +26,7 @@
%setup -q -c -a 0
%patch1 -p0
+%patch2 -p0
%build
rm -rf $RPM_BUILD_ROOT
@@ -68,6 +70,9 @@
exit 0
%changelog
+* Wed Apr 6 2005 Dave Jones <davej at redhat.com>
+- Don't count nice time as idle time. (#132383)
+
* Tue Mar 1 2005 Dave Jones <davej at redhat.com>
- Rebuild for gcc4.
--- cpuspeed-smp.patch DELETED ---
More information about the fedora-cvs-commits
mailing list