Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 126797 Details for
Bug 187581
sys-power/cpufreqd-2.2.1: logical error for CPU_ALL in cpu_evaluate
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch correcting the logic
2.2.1-cpu_all.patch (text/plain), 1.31 KB, created by
Martin von Gagern
on 2007-08-03 12:55:59 UTC
(
hide
)
Description:
patch correcting the logic
Filename:
MIME Type:
Creator:
Martin von Gagern
Created:
2007-08-03 12:55:59 UTC
Size:
1.31 KB
patch
obsolete
>--- cpufreqd-2.2.1.orig/src/cpufreqd_cpu.c 2007-08-03 13:55:54.000000000 +0200 >+++ cpufreqd-2.2.1/src/cpufreqd_cpu.c 2007-08-03 14:17:36.000000000 +0200 >@@ -222,7 +222,7 @@ > /* special handling for CPU_ALL and CPU_ANY */ > if (c->cpu == CPU_ANY || c->cpu == CPU_ALL) { > for (i = 0; i < cinfo->cpus; i++) { >- clog(LOG_DEBUG, "CPU%d user=%d nice=%d sys=%d\n", c->cpu, >+ clog(LOG_DEBUG, "CPU%d user=%d nice=%d sys=%d\n", i, > cusage[i].c_user, cusage[i].c_nice, cusage[i].c_sys); > cpu_percent = calculate_cpu_usage(&cusage[i], &cusage_old[i], c->nice_scale); > clog(LOG_DEBUG, "CPU%d %d%% - min=%d max=%d scale=%.2f (%s)\n", i, cpu_percent, >@@ -234,14 +234,16 @@ > if (c->cpu == CPU_ALL && !(cpu_percent >= c->min && cpu_percent <= c->max)) > break; > } >- /* if this code is reached then either CPU_ANY and none matches >- * or CPU_ALL and all match >+ /* if this code is reached then >+ * either CPU_ANY and none matches >+ * or CPU_ALL and all match, where i == cinfo->cpus >+ * or CPU_ALL and break was called > */ >- if (c->cpu == CPU_ANY) { >- c = c->next; >- continue; >- } >- return MATCH; /*if (c->cpu == ALL)*/ >+ if (c->cpu == CPU_ALL && i == cinfo->cpus) >+ return MATCH; >+ >+ c = c->next; >+ continue; > } > > /* cacluate weighted activity for the requested CPU */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 187581
: 126797