All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: QEMU Developers <qemu-devel@nongnu.org>
Cc: "Fam Zheng" <famz@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: tests/vm/openbsd script (etc) excessive CPU usage
Date: Sat, 25 Jul 2020 15:20:06 +0100	[thread overview]
Message-ID: <CAFEAcA__RiZoe9qRTT_ZCbm_FmXZMO2MseGkimtL459Uoaoi9A@mail.gmail.com> (raw)

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.

thanks
-- PMM


             reply	other threads:[~2020-07-25 14:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-25 14:20 Peter Maydell [this message]
2020-07-27 13:03 ` tests/vm/openbsd script (etc) excessive CPU usage Alex Bennée

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=CAFEAcA__RiZoe9qRTT_ZCbm_FmXZMO2MseGkimtL459Uoaoi9A@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=famz@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.