Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 662423 Details for
Bug 886185
powertop looks in all the wrong places for cpufreq sysfs files
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed fix sent upstream
0001-cpufreq-only-try-to-open-files-under-cpuX.patch (text/plain), 1.58 KB, created by
Jaroslav Škarvada
on 2012-12-12 16:05:53 UTC
(
hide
)
Description:
Proposed fix sent upstream
Filename:
MIME Type:
Creator:
Jaroslav Škarvada
Created:
2012-12-12 16:05:53 UTC
Size:
1.58 KB
patch
obsolete
>From 33a7ac362810b8483204e90e92ad4657162af363 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com> >Date: Wed, 12 Dec 2012 16:19:56 +0100 >Subject: [PATCH] cpufreq: only try to open files under cpuX >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >There are called many useless 'open' syscalls that always fail, like: > open("/sys/devices/system/cpu/uevent/cpufreq/scaling_governor", O_RDONLY) = -1 ENOTDIR (Not a directory) >This patch filters this to /sys/devices/system/cpu/cpuX, where X is string >starting with digit (from kernel sources it seems that X can only be integer). >For match cases it will add only small overhead. > >Originally reported as: >https://bugzilla.redhat.com/show_bug.cgi?id=886185 > >Signed-off-by: Jaroslav Å karvada <jskarvad@redhat.com> >--- > src/tuning/cpufreq.cpp | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/src/tuning/cpufreq.cpp b/src/tuning/cpufreq.cpp >index df245ad..c448f4c 100644 >--- a/src/tuning/cpufreq.cpp >+++ b/src/tuning/cpufreq.cpp >@@ -36,6 +36,7 @@ > #include <dirent.h> > #include <errno.h> > #include <sys/stat.h> >+#include <ctype.h> > > #include "../lib.h" > #include "cpufreq.h" >@@ -72,7 +73,7 @@ int cpufreq_tunable::good_bad(void) > return ret; > > while ((dirent = readdir(dir))) { >- if (dirent->d_name[0]=='.') >+ if (strlen(dirent->d_name) < 4 || strncmp(dirent->d_name, "cpu", 3) != 0 || !isdigit(dirent->d_name[3])) > continue; > sprintf(filename, "/sys/devices/system/cpu/%s/cpufreq/scaling_governor", dirent->d_name); > file = fopen(filename, "r"); >-- >1.7.11.7 >
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 886185
:
662423
|
663007
|
678277