On 10/09/2012 02:18 PM, Jan Kiszka wrote: > Not sure about the full context of this discussion, but I played with > "stop-machine" (pause_all_vcpus) recently. The problem is, at least ATM, > that it drops the BQL to wait for those threads, and that creates an > unexpected rescheduling point over which a lot of code stumbles. But if > this case here is about new, accordingly written code that is also not > called from unprepared corners, it may work.
In theory we could make qemu_mutex_lock() detect that it's being stop_machine()d and loop there - stop_machine() would just keep the lock held. But that's not doable easily with pthreads (there is no mutex_lock_interruptible() equivalent). In any case I've cooled down on stop_machine(), see sibling reply. -- error compiling committee.c: too many arguments to function