Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 647952 - >=app-emulation/qemu-2.11.0 - qemu-arm user emulation is slow
Summary: >=app-emulation/qemu-2.11.0 - qemu-arm user emulation is slow
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo QEMU Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-17 16:58 UTC by David Flogeras
Modified: 2018-04-04 15:52 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Flogeras 2018-02-17 16:58:01 UTC
After upgrading to qemu-2.11.0, I see a noticeable delay in qemu-arm when starting any application.  I use qemu-arm in a chroot (via binfmt wrapper) to build packages, so when running an emerge which spawns many sub-processes it really slows down emulation.

If I downgrade back to qemu-2.10.1-r1 in an overlay, the problem goes away.  I also tried upgrading to the freshly added 2.11.1 but it has the same problem as 2.11.0.  qemu-aarch64 does not exhibit this behaviour using it in the same fashion (qemu+binfmt_wrapper+chroot)

Reproducible: Always
Comment 1 Daniel Dewald 2018-03-15 23:37:03 UTC
I can confirm this problem. With the update to 2.11 compiling packages for a raspberry pie using qemu-arm and a chroot has become impossible. It takes ages for ever single operation :-(.
Comment 2 David Flogeras 2018-03-15 23:54:06 UTC
It looks as though the patches mentioned in the linked bug report have made their way into upstream, hopefully meaning qemu-2.12.
Comment 3 Matthias Maier gentoo-dev 2018-03-18 20:14:45 UTC
(In reply to David Flogeras from comment #2)
> It looks as though the patches mentioned in the linked bug report have made
> their way into upstream, hopefully meaning qemu-2.12.

I don't see any of the patches in the qemu git repository. Otherwise, I would have created a small patchset applying these patches already onto the 2.11.1 version we currently have in tree. Can you point me to the commits, please?
Comment 4 David Flogeras 2018-03-18 23:11:00 UTC
Hmm, it looks like I may be wrong.  Here's the commits I saw

https://git.qemu.org/?p=qemu.git;a=search;s=Luke+Shumaker;st=author

It seems 9/10 of his commits were pulled, but the one missing is the one he mentioned in the pull-request as being the actual fix.

Not sure why.
Comment 5 David Flogeras 2018-03-30 15:02:07 UTC
It looks as though the final patch was accepted/applied

https://git.qemu.org/?p=qemu.git;a=commit;h=2a53535af471f4bee9d6cb5b363746b8d5ed21dd

(Also see the linked bug)

So it appears it will make it into 2.12.0

According to the discussion on launchpad, the patchset applies cleanly to 2.11 (but it also look as though 2.12.0 is imminent and might be a waste of effort to backport).
Comment 6 David Flogeras 2018-03-30 17:14:56 UTC
For fun, I applied just the commit I linked in comment #4 to qemu 2.11.1-r1 in tree, and the slowdown issue went away for me.
Comment 7 Alexander Tsoy 2018-04-04 06:56:32 UTC
(In reply to David Flogeras from comment #5)
> https://git.qemu.org/?p=qemu.git;a=commit;
> h=2a53535af471f4bee9d6cb5b363746b8d5ed21dd

Confirming that this patch fixes the slowdown issue.
Comment 8 Larry the Git Cow gentoo-dev 2018-04-04 15:52:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e564224a7c1a74c8772284a7b40c39f35ae9250f

commit e564224a7c1a74c8772284a7b40c39f35ae9250f
Author:     Matthias Maier <tamiko@gentoo.org>
AuthorDate: 2018-04-04 15:49:32 +0000
Commit:     Matthias Maier <tamiko@gentoo.org>
CommitDate: 2018-04-04 15:52:12 +0000

    app-emulation/qemu: ebuild maintenance
    
     * desnappify
    
     * fix ARM performance issue. Thanks to David Flogeras and Alexander Tsoy.
    
     Closes: https://bugs.gentoo.org/647952
     Closes: https://bugs.gentoo.org/651602
    
    Package-Manager: Portage-2.3.28, Repoman-2.3.9

 app-emulation/qemu/Manifest                                         | 1 +
 .../qemu/{qemu-2.11.1-r52.ebuild => qemu-2.11.1-r53.ebuild}         | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)