AArch64: slow cpuinfo due to redundant loop

Bug #1582181 reported by Alexandru Avadanii
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
lshw (Ubuntu)
Fix Released
Undecided
Ike Panhc
Xenial
Fix Released
Undecided
Ike Panhc
Artful
Fix Released
Undecided
Ike Panhc
Bionic
Fix Released
Undecided
Ike Panhc

Bug Description

[Impact]
lshw takes too long time on parsing /proc/cpuinfo on aarch64 system
It takes minutes on 96cores and almost 10min on 224cores system.

[Test Case]
`time lshw` and it shall be less then 15sec

[Regression Potential]
This patch only modifies codes for aarch64. Lowest regression rick on other arch and has been tested on aarch64

[Other Info]
Patch has been merged into upstream branch.
https://github.com/lyonel/lshw/commit/20cda77239e8604e798b87a0441e694edb0214d1

Revision history for this message
Alexandru Avadanii (alexandru-avadanii) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "AArch64-cpuinfo-Remove-redundant-cpu-caps-loop.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lshw (Ubuntu):
status: New → Confirmed
Revision history for this message
Matt Dirba (5qxm) wrote :

My 200+ ARM machine fails to commission in MaaS because lshw takes 8 minutes to run. I will try out this patch and see if it speeds up lshw.

Revision history for this message
Alexandru Avadanii (alexandru-avadanii) wrote :

Hi,
If it helps, we have an old DEB package at [1].
I think it's based on the lshw version that was used by Trusty or Xenial at that time.

[1] http://linux.enea.com/mos-repos/ubuntu/10.0/pool/main/l/lshw/

Revision history for this message
Alexandru Avadanii (alexandru-avadanii) wrote :

I see nobody acted on this, so I sent a PR [1] upstream.
Will update this ticket if it gets pulled.

[1] https://github.com/lyonel/lshw/pull/36

Revision history for this message
Ike Panhc (ikepanhc) wrote :

This issue also affects me. With about 10min for lshw it nearly fails MAAS commisioning.

Revision history for this message
Alexandru Avadanii (alexandru-avadanii) wrote :

Upstream PR merged.

Revision history for this message
Ike Panhc (ikepanhc) wrote :

Thanks. Process to upload.

Changed in lshw (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Ike Panhc (ikepanhc)
Ike Panhc (ikepanhc)
description: updated
description: updated
description: updated
dann frazier (dannf)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lshw - 02.18-0.1ubuntu6

---------------
lshw (02.18-0.1ubuntu6) bionic; urgency=medium

  * AArch64: cpuinfo: Remove redundant cpu caps loop (LP: #1582181)
    (Merged into EZix upstream commit [20cda772])

 -- Ike Panhc <email address hidden> Wed, 21 Mar 2018 14:42:13 +0800

Changed in lshw (Ubuntu Bionic):
status: In Progress → Fix Released
Ike Panhc (ikepanhc)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Alexandru, or anyone else affected,

Accepted lshw into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lshw/02.18-0.1ubuntu4.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in lshw (Ubuntu Artful):
status: New → Fix Committed
tags: added: verification-needed verification-needed-artful
Changed in lshw (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Alexandru, or anyone else affected,

Accepted lshw into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lshw/02.17-1.1ubuntu3.5 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Ike Panhc (ikepanhc) wrote :

lshw in xenial-proposed fixes this issue.

ubuntu@recht:~$ time lshw > /dev/null;dpkg --list | grep lshw
WARNING: you should run this program as super-user.
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

real 1m50.371s
user 1m50.240s
sys 0m0.104s
ii lshw 02.17-1.1ubuntu3.4 arm64 information about hardware configuration

ubuntu@recht:~$ time lshw > /dev/null;dpkg --list | grep lshw
WARNING: you should run this program as super-user.
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

real 0m2.548s
user 0m2.460s
sys 0m0.084s
ii lshw 02.17-1.1ubuntu3.5 arm64 information about hardware configuration

tags: added: verification-done-xenial
removed: verification-needed-xenial
Changed in lshw (Ubuntu Artful):
assignee: nobody → Ike Panhc (ikepanhc)
Changed in lshw (Ubuntu Xenial):
assignee: nobody → Ike Panhc (ikepanhc)
Revision history for this message
Ike Panhc (ikepanhc) wrote :

lshw in artful-proposed fixes this issue.

ubuntu@recht:~$ time lshw > /dev/null ; dpkg --list | grep lshw
WARNING: you should run this program as super-user.
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

real 2m10.793s
user 2m10.589s
sys 0m0.192s
ii lshw 02.18-0.1ubuntu4 arm64 information about hardware configuration

ubuntu@recht:~$ time lshw > /dev/null ; dpkg --list | grep lshw
WARNING: you should run this program as super-user.
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

real 0m3.210s
user 0m2.984s
sys 0m0.221s
ii lshw 02.18-0.1ubuntu4.1 arm64 information about hardware configuration

tags: added: verification-done verification-done-artful
removed: verification-needed verification-needed-artful
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for lshw has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lshw - 02.17-1.1ubuntu3.5

---------------
lshw (02.17-1.1ubuntu3.5) xenial; urgency=medium

  * AArch64: cpuinfo: Remove redundant cpu caps loop (LP: #1582181)
    (Merged into EZix upstream commit [20cda772])

 -- Ike Panhc <email address hidden> Wed, 21 Mar 2018 13:12:21 +0800

Changed in lshw (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lshw - 02.18-0.1ubuntu4.1

---------------
lshw (02.18-0.1ubuntu4.1) artful; urgency=medium

  * AArch64: cpuinfo: Remove redundant cpu caps loop (LP: #1582181)
    (Merged into EZix upstream commit [20cda772])

 -- Ike Panhc <email address hidden> Wed, 21 Mar 2018 14:37:08 +0800

Changed in lshw (Ubuntu Artful):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.