From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Fam Zheng" <famz@redhat.com>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Robert Foley" <robert.foley@linaro.org>
Subject: Re: tests/vm/openbsd script (etc) excessive CPU usage
Date: Mon, 27 Jul 2020 14:03:22 +0100 [thread overview]
Message-ID: <87blk13yat.fsf@linaro.org> (raw)
In-Reply-To: <CAFEAcA__RiZoe9qRTT_ZCbm_FmXZMO2MseGkimtL459Uoaoi9A@mail.gmail.com>
Peter Maydell <peter.maydell@linaro.org> writes:
> I noticed that when running the BSD VMs, the Python script that launches
> QEMU seems to eat CPU:
>
> peter.m+ 19024 0.0 0.0 20296 11692 pts/12 S+ 15:04 0:00
> \_ make -C build vm-build-openbsd J=8 V=1
> peter.m+ 19858 98.8 0.0 126272 15220 pts/12 Sl+ 15:04 12:04
> \_ /usr/bin/python3 -B
> /home/peter.maydell/qemu-openbsd/tests/vm/openbsd --debug --jobs 8
> --verbose --efi-aarch64
> /home/peter.maydell/qemu-openbsd/build/pc-bios/edk2-aarch64-code.fd
> --image /home/peter.maydell/.cache/qemu-vm/images/openbsd.img
> --snapshot --build-qemu /home/peter.maydell/qemu-openbsd --
> peter.m+ 22878 711 3.2 10506236 3192896 pts/12 Sl+ 15:04 86:08
> \_ qemu-system-x86_64 -display none -vga none -chardev
> socket,id=mon,path=/var/tmp/qemu-19858-monitor.sock -mon
> chardev=mon,mode=control -machine pc -chardev
> socket,id=console,path=/var/tmp/qemu-19858-console.sock,server,nowait
> -serial chardev:console -nodefaults -m 4G -cpu max -netdev
> user,id=vnet,hostfwd=:127.0.0.1:0-:22 -device
> virtio-net-pci,netdev=vnet -vnc 127.0.0.1:0,to=20 -smp 8 -enable-kvm
> -drive file=/home/peter.maydell/.cache/qemu-vm/images/openbsd.img,snapshot=on,if=none,id=drive0,cache=writeback
> -device virtio-blk,drive=drive0,bootindex=0 -drive
> file=/home/peter.maydell/qemu-openbsd/build/vm-test-g6q_po6_.tmp/data-993a1.tar,if=none,id=data-993a1,cache=writeback,format=raw
> -device virtio-blk,drive=data-993a1,serial=data-993a1,bootindex=1
> peter.m+ 29304 0.0 0.0 63612 4996 pts/12 S+ 15:05 0:00
> \_ ssh -t -o StrictHostKeyChecking=no -o
> UserKnownHostsFile=/dev/null -o ConnectTimeout=1 -p 38491 -i
> /home/peter.maydell/qemu-openbsd/build/vm-test-g6q_po6_.tmp/id_rsa -o
> SendEnv=https_proxy -o SendEnv=http_proxy -o SendEnv=ftp_proxy -o
> SendEnv=no_proxy qemu@127.0.0.1 set -e; rm -rf
> /home/qemu/qemu-test.* cd $(mktemp -d
> /home/qemu/qemu-test.XXXXXX); mkdir src build; cd src;
> tar -xf /dev/rsd1c; cd ../build ../src/configure
> --cc=cc --python=python3 ;
>
>
> Notice that process 19858 (the python script) is at 98.8% CPU.
> This isn't specific to the OpenBSD script, the other BSD scripts
> do this too.
>
> Why is this script using so much CPU when it should basically just be
> waiting for the QEMU VM to finish ?
>
> I think this is probably a recent regression, though I'm not certain.
Robert thinks this is fixed up with the latest clean-ups for the console
drain thread which is in today's PR. I've not seen it while testing the
PR so I think it's gone.
--
Alex Bennée
prev parent reply other threads:[~2020-07-27 13:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-25 14:20 tests/vm/openbsd script (etc) excessive CPU usage Peter Maydell
2020-07-27 13:03 ` Alex Bennée [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87blk13yat.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=famz@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=robert.foley@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).