+++ This bug was initially created as a clone of Bug #301821 +++ 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 /sys/devices/system/cpu/cpuidle/online 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 available. 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): irqbalance-0.55-4.fc8.x86_64 How reproducible: always (I guess) Steps to Reproduce: 1.start irqbalance 2.attach to it using strace or use a systemtap script monitoring open calls 3. Actual results: Lots of reloading the /sys/devices/system/cpu/ hierarchy and looking for /sys/devices/system/cpu/cpuidle/online etc. Expected results: Infrequent (none after startup?) parsing of the hierarchy. Don't look into /sys/devices/system/cpu/cpuidle/ at all. Additional info: This patch should probably also be added to RHEL5 and F7. -- Additional comment from drepper on 2007-09-22 18:20 EST -- Created an attachment (id=203251) Patch to avoid unnecessary lookups and small optimizations -- Additional comment from nhorman on 2007-09-26 15:58 EST -- Thanks Uli, this all looks good to me. I'll get this to upstream, F7/8 amd RHEL
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
fixed in 0.55-7
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2008-0419.html