[Bug 1582181] Re: AArch64: slow cpuinfo due to redundant loop
Launchpad Bug Tracker
1582181 at bugs.launchpad.net
Fri Sep 8 18:45:48 UTC 2017
Status changed to 'Confirmed' because the bug affects multiple users.
** Changed in: lshw (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to lshw in Ubuntu.
https://bugs.launchpad.net/bugs/1582181
Title:
AArch64: slow cpuinfo due to redundant loop
Status in lshw package in Ubuntu:
Confirmed
Bug description:
lshw on AArch64 hardware is painfully slow.
This affects both lshw in current Ubuntu releases and vanilla upstream.
For a 48 core node, cpuinfo parsing added up to 30 seconds (8 lines
per core in /proc/cpuinfo add up to 384 lines to parse).
For a 96 core node, parsing took up to 5 minutes (!).
I think the problem was introduced by [1], and can be summarized as:
- CPU capabilities should be added only to the current CPU core,
and NOT to all previous CPU cores parsed.
My suggestion is dropping the loop in [1], thus calling the <addHint>
and <describeCapability> only for currentcpu.
I put together a small patch (basically removing the for loop in question)
at [2] (or see attachement), which should be applied on top of version
"02.16-2ubuntu1.3" from Ubuntu Trusty 14.04.
After applying the patch at [2], parsing for the above system (48 cores)
takes less than 1 second (instead of 30s), with the exact same results ...
[1]
https://github.com/lyonel/lshw/commit/beb89de5a3c10449fe73f1c77b2486d868e5bc9a
#diff-f4010714738fa4cdd5999499579da2b3R217
[2] http://paste.ubuntu.com/16456620/
# lsb_release -rd
Description: Ubuntu 14.04.4 LTS
Release: 14.04
BR,
Alex
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/1582181/+subscriptions
More information about the foundations-bugs
mailing list