Paolo Bonzini <pbonz...@redhat.com> writes: > On 30/11/2016 10:46, Peter Maydell wrote: >>> > The problem is indeed with the scheduling. The way it currently works >>> > is to depend on the iothread to kick a reschedule once in a while, or >>> > a cpu to issue an instruction that does so (wfe/wfi). However if >>> > there's no io and a cpu never issues a scheduling instruction, then it >>> > won't happen. We either need a sched tick or to never have an infinite >>> > iothread ppoll timeout (basically using the ppoll timeout as a tick). >> Ah yes, that one. I thought Alex had a patch which added >> a timer to ensure that we don't allow a single guest >> TCG vCPU to hog the execution thread, but maybe I'm >> misremembering. > > Yes, it's part of MTTCG.
The patch itself is: tcg: add kick timer for single-threaded vCPU emulation It's not really part of MTTCG as it can be applied without reference to the MTTCG work. However it is a pre-requisite to the iothread mutex rework that MTTCG requires which would otherwise break the single threaded case which currently relies on the side-effect to trigger scheduling. > > Paolo -- Alex Bennée