Emilio G. Cota <c...@braap.org> writes:
> The current implementation of exclusive work can suffer from high > contention when the number of guest CPUs is large (> 16 or so). The > reason is that all CPUs end up waiting on the same condvar/mutex pair, > which unnecessarily slows them down to wake up. <snip> FWIW this is the commit that breaks the linux-test code. I get the following: (gdb) thread apply all bt Thread 2 (Thread 0x7ffff64d3700 (LWP 33607)): #0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 #1 0x000055555574d6db in qemu_futex_wait (val=<optimized out>, f=<optimized out>) at /home/alex.bennee/lsrc/qemu.git/include/qemu/futex.h:29 #2 qemu_event_wait (ev=ev@entry=0x555557c4f428 <rcu_call_ready_event>) at util/qemu-thread-posix.c:442 #3 0x0000555555754158 in call_rcu_thread (opaque=<optimized out>) at util/rcu.c:261 #4 0x00007ffff6b3e6db in start_thread (arg=0x7ffff64d3700) at pthread_create.c:463 #5 0x00007ffff686788f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Thread 1 (Thread 0x7ffff7fda500 (LWP 33603)): #0 safe_syscall_base () at /home/alex.bennee/lsrc/qemu.git/linux-user/host/x86_64/safe-syscall.inc.S:75 #1 0x000055555563793a in safe_wait4 (rusage=0x0, options=<optimized out>, status=0x7fffffffc350, pid=1472725552) at /home/alex.bennee/lsrc/qemu.git/linux-user/syscall.c:730 #2 do_syscall1 (cpu_env=cpu_env@entry=0x555557c88550, num=num@entry=260, arg1=arg1@entry=33608, arg2=arg2@entry=274886295360, arg3=<optimized out>, arg4=0, arg5=4743376, arg6=4743168, arg8=0, arg7=0) at /home/alex.bennee/lsrc/qemu.git/linux-user/syscall.c:8784 #3 0x000055555564225a in do_syscall (cpu_env=cpu_env@entry=0x555557c88550, num=260, arg1=33608, arg2=274886295360, arg3=<optimized out>, arg4=<optimized out>, arg5=4743376, arg6=4743168, arg7=0, arg8=0) at /home/alex.bennee/lsrc/qemu.git/linux-user/syscall.c:11432 #4 0x000055555564bc8a in cpu_loop (env=0x555557c88550) at /home/alex.bennee/lsrc/qemu.git/linux-user/aarch64/cpu_loop.c:88 #5 0x00005555555e581c in main (argc=<optimized out>, argv=0x7fffffffe038, envp=<optimized out>) at /home/alex.bennee/lsrc/qemu.git/linux-user/main.c:819 I don't seem to be able to step through it but it looks like the newly spawned thread is blocked on the futex and the safe_wait4 never progresses. -- Alex Bennée