* yue (kvml...@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 / dgilb...@redhat.com / Manchester, UK