Description of problem:
irqbalance uses the topology information from /sys/devices/system/cpu. I
noticed that when reading the hierarchy irqbalance tries to open nonsense files like
This is due to an incomplete check when reading the directory
/sys/devices/system/cpu. The code only checks for a substring "cpu" to be
Once I fixed that I noticed that irqbalance doesn't access these files after the
startup anymore. This is probably due to the fact that recognizing "cpuidle" as
a real CPU the CPU count is thrown off. I haven't investigated this further.
But this little inefficiency is in fact a real bug.
While I was at it I rewrote a large amount of inefficient code. openat() saves
creating path strings and reduces the lookup times. Not creating a new string
for each getline call saves overhead related to memory handling.
Version-Release number of selected component (if applicable):
always (I guess)
Steps to Reproduce:
2.attach to it using strace or use a systemtap script monitoring open calls
Lots of reloading the /sys/devices/system/cpu/ hierarchy and looking for
Infrequent (none after startup?) parsing of the hierarchy. Don't look into
/sys/devices/system/cpu/cpuidle/ at all.
This patch should probably also be added to RHEL5 and F7.
Created attachment 203251 [details]
Patch to avoid unnecessary lookups and small optimizations
Thanks Uli, this all looks good to me. I'll get this to upstream, F7/8 amd RHEL
Based on the date this bug was created, it appears to have been reported
during the development of Fedora 8. In order to refocus our efforts as
a project we are changing the version of this bug to '8'.
If this bug still exists in rawhide, please change the version back to
(If you're unable to change the bug's version, add a comment to the bug
and someone will change it for you.)
Thanks for your help and we apologize for the interruption.
The process we're following is outlined here:
We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
The patch I provided is in F9. So this bug can be closed.