]> git.pld-linux.org Git - packages/cpuspeed.git/blame - cpuspeed-idlenice.diff
- nostrip
[packages/cpuspeed.git] / cpuspeed-idlenice.diff
CommitLineData
3d1a6b78 1--- ./cpuspeed-1.2.1/cpuspeed.cc~ 2005-04-06 15:04:28.000000000 -0300
2+++ ./cpuspeed-1.2.1/cpuspeed.cc 2005-04-06 15:12:55.000000000 -0300
3@@ -122,6 +122,9 @@
4 unsigned current_speed; // current speed step
5 unsigned last_step; // lowest speed step
6
7+// whether to account nice time as user time (true) or idle time (false)
8+bool include_nice = false;
9+
10 // which CPU are we controlling
11 unsigned cpu = 0;
12
13@@ -324,8 +327,10 @@
14 &system_time, &idle_time, &wait_time
15 );
16
17- // count nice time as idle time
18- idle_time += nice_time;
19+ if (!include_nice)
20+ idle_time += nice_time;
21+ else
22+ user_time += nice_time;
23
24 // count IO wait time as idle time
25 idle_time += wait_time;
26@@ -598,6 +603,8 @@
27 fprintf(stderr, "CPU interval is %u\n", interval);
28 #endif
29 }
30+ else if(!strcmp(argv[i], "-n"))
31+ include_nice = true;
32 else if(!strcmp(argv[i], "-p"))
33 {
34 if (argc <= i + 2)
35@@ -708,6 +715,9 @@
36 " Sets the interval between idle percentage tests and possible speed\n"
37 " changes in tenths of a second (default is 20).\n"
38 "\n"
39+ " -n\n"
40+ " Includes nice time as cpu time (off by default)\n"
41+ "\n"
42 " -p <fast up> <threshold>\n"
43 " Sets the CPU idle percentage thresholds. <fast up> is the idle\n"
44 " percentage below which a CPU will be set to the highest possible\n"
45--- ./cpuspeed-1.2.1/cpuspeed.conf~ 2005-04-06 15:11:46.000000000 -0300
46+++ ./cpuspeed-1.2.1/cpuspeed.conf 2005-04-06 15:11:52.000000000 -0300
47@@ -4,6 +4,9 @@
48 # uncomment this and set to the name of your CPUFreq module
49 #DRIVER="powernow-k7"
50
51+# Let background (nice) processes speed up the cpu
52+OPTS="$OPTS -n"
53+
54 # Add your favorite options here
55 #OPTS="$OPTS -s 0 -i 10 -r"
56
This page took 0.044111 seconds and 4 git commands to generate.