From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: yue <kvmluck@163.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: a qemu process has 54 threads, how to know who they are and what they are doing
Date: Thu, 28 Apr 2022 19:51:48 +0100 [thread overview]
Message-ID: <YmriRJgfOngf5qDb@work-vm> (raw)
In-Reply-To: <c34d759.1161.18049c8b2d4.Coremail.kvmluck@163.com>
* yue (kvmluck@163.com) wrote:
> Hi, i think it is curios for a process to have so many threads.
>
> my environment: 5.4.160-1.el7.x86_64, qemu-6.1.0
If you pass:
-name whatever,debug-threads=on
then the qemu will set the kernel thread name to names
like 'CPU 0/Kvm' or 'migration' or whatever, so you can tell what
the thread is.
I'd bet your threads are mostly IO threads, you can configure that a
lot.
Dave
> thanks
>
>
> =============cmd==================
> root 11918 0.0 0.0 112720 2280 pts/0 S+ 09:30 0:00 grep --color=auto 38032
> root 38032 58.0 1.0 8705632 2823304 ? Sl Apr19 1451:10 /opt/kata/bin/qemu-system-x86_64 -name sandbox-598c832569b63321f393b1f
> ef6d23cb209a9668a17f3b56a8eb87171506baaf8 -uuid 9ab925f1-86f2-4703-801e-be23ce0fdca6 -machine q35,accel=kvm,kernel_irqchip=on,nvdimm=on
> -cpu host,pmu=off -qmp unix:/run/vc/vm/598c832569b63321f393b1fef6d23cb209a9668a17f3b56a8eb87171506baaf8/qmp.sock,server=on,wait=off -qmp
> unix:/run/vc/vm/598c832569b63321f393b1fef6d23cb209a9668a17f3b56a8eb87171506baaf8/qmp-guestcsi.sock,server=on,wait=off -qmp unix:/run/vc
> /vm/598c832569b63321f393b1fef6d23cb209a9668a17f3b56a8eb87171506baaf8/qmp-guestcni.sock,server=on,wait=off -m 4352M,slots=10,maxmem=25856
> 2M -device pci-bridge,bus=pcie.0,id=pci-bridge-0,chassis_nr=1,shpc=off,addr=2,io-reserve=4k,mem-reserve=1m,pref64-reserve=1m -device vir
> tio-serial-pci,disable-modern=false,id=serial0 -device virtconsole,chardev=charconsole0,id=console0 -chardev socket,id=charconsole0,path
> =/run/vc/vm/598c832569b63321f393b1fef6d23cb209a9668a17f3b56a8eb87171506baaf8/console.sock,server=on,wait=off -device nvdimm,id=nv0,memde
> v=mem0,unarmed=on -object memory-backend-file,id=mem0,mem-path=/opt/kata/share/kata-containers/kata-containers-2.4.img,size=134217728,re
> adonly=on -object rng-random,id=rng0,filename=/dev/urandom -device virtio-rng-pci,rng=rng0 -device pcie-root-port,id=rp0,bus=pcie.0,chas
> sis=0,slot=0,multifunction=off -device pcie-root-port,id=rp1,bus=pcie.0,chassis=0,slot=1,multifunction=off -device vhost-vsock-pci,disab
> le-modern=false,vhostfd=3,id=vsock-2210812542,guest-cid=2210812542 -device virtio-9p-pci,disable-modern=false,fsdev=extra-9p-kataShared,
> mount_tag=kataShared -fsdev local,id=extra-9p-kataShared,path=/run/kata-containers/shared/sandboxes/598c832569b63321f393b1fef6d23cb209a9
> 668a17f3b56a8eb87171506baaf8/shared,security_model=none,multidevs=remap -netdev tap,id=network-0,vhost=on,vhostfds=4:5:6,fds=7:8:9 -devi
> ce driver=virtio-net-pci,netdev=network-0,mac=fa:16:3e:fd:ba:ab,disable-modern=false,mq=on,vectors=8 -rtc base=utc,driftfix=slew,clock=h
> ost -global kvm-pit.lost_tick_policy=discard -vga none -no-user-config -nodefaults -nographic --no-reboot -daemonize -object memory-back
> end-ram,id=dimm1,size=4352M -numa node,memdev=dimm1 -kernel /opt/kata/share/kata-containers/vmlinux-5.4.160 -append tsc=reliable no_time
> r_check rcupdate.rcu_expedited=1 i8042.direct=1 i8042.dumbkbd=1 i8042.nopnp=1 i8042.noaux=1 noreplace-smp reboot=k console=hvc0 console=
> hvc1 cryptomgr.notests net.ifnames=0 pci=lastbus=0 root=/dev/pmem0p1 rootflags=dax,data=ordered,errors=remount-ro ro rootfstype=ext4 deb
> ug systemd.show_status=true systemd.log_level=debug panic=1 nr_cpus=40 systemd.unit=kata-containers.target systemd.mask=systemd-networkd
> .service systemd.mask=systemd-networkd.socket agent.debug_console agent.debug_console_vport=1026 -pidfile /run/vc/vm/598c832569b63321f39
> 3b1fef6d23cb209a9668a17f3b56a8eb87171506baaf8/pid -D /run/vc/vm/598c832569b63321f393b1fef6d23cb209a9668a17f3b56a8eb87171506baaf8/qemu.lo
> g -smp 3,cores=1,threads=1,sockets=40,maxcpus=40
> root 38038 0.0 0.0 0 0 ? S Apr19 0:10 [vhost-38032]
> root 38040 0.0 0.0 0 0 ? S Apr19 0:10 [vhost-38032]
> root 38041 0.0 0.0 0 0 ? S Apr19 0:11 [vhost-38032]
> root 38046 0.0 0.0 0 0 ? S Apr19 0:00 [kvm-pit/38032]
> root 38047 0.0 0.0 0 0 ? S Apr19 0:02 [vhost-38032]
> [root@os ~]# ps -L -p 38032 | wc -l
> 54
> [root@os ~]# ps -fT -p 38032 | wc -l
> 54
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2022-04-28 18:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-21 1:42 a qemu process has 54 threads, how to know who they are and what they are doing yue
2022-04-28 18:51 ` Dr. David Alan Gilbert [this message]
2022-04-28 22:10 ` Paolo Bonzini
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=YmriRJgfOngf5qDb@work-vm \
--to=dgilbert@redhat.com \
--cc=kvmluck@163.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.