Re: Role of qemu_fair_mutex

2011-01-05 Thread Avi Kivity
On 01/05/2011 06:44 PM, Anthony Liguori wrote: On 01/04/2011 03:39 PM, Marcelo Tosatti wrote: On Tue, Jan 04, 2011 at 08:17:26AM -0600, Anthony Liguori wrote: On 01/03/2011 04:01 AM, Avi Kivity wrote: On 01/03/2011 11:46 AM, Jan Kiszka wrote: Hi, at least in kvm mode, the qemu_fair_mutex see

Re: Role of qemu_fair_mutex

2011-01-05 Thread Anthony Liguori
On 01/04/2011 03:39 PM, Marcelo Tosatti wrote: On Tue, Jan 04, 2011 at 08:17:26AM -0600, Anthony Liguori wrote: On 01/03/2011 04:01 AM, Avi Kivity wrote: On 01/03/2011 11:46 AM, Jan Kiszka wrote: Hi, at least in kvm mode, the qemu_fair_mutex seems to have lost its function o

Re: Role of qemu_fair_mutex

2011-01-05 Thread Avi Kivity
On 01/04/2011 05:43 PM, Anthony Liguori wrote: The fact that the iothread drops the global lock during sleep is a detail that shouldn't affect correctness. The IO thread is absolutely allowed to run for arbitrary periods of time without dropping the qemu mutex. No, it's not, since it will st

Re: Role of qemu_fair_mutex

2011-01-04 Thread Marcelo Tosatti
On Tue, Jan 04, 2011 at 08:17:26AM -0600, Anthony Liguori wrote: > On 01/03/2011 04:01 AM, Avi Kivity wrote: > >On 01/03/2011 11:46 AM, Jan Kiszka wrote: > >>Hi, > >> > >>at least in kvm mode, the qemu_fair_mutex seems to have lost its > >>function of balancing qemu_global_mutex access between the

Re: Role of qemu_fair_mutex

2011-01-04 Thread Anthony Liguori
On 01/04/2011 09:12 AM, Avi Kivity wrote: On 01/04/2011 04:55 PM, Anthony Liguori wrote: When the TCG thread, it needs to let the IO thread run for at least one iteration. Coordinating the execution of the IO thread such that it's guaranteed to run at least once and then having it drop th

Re: Role of qemu_fair_mutex

2011-01-04 Thread Avi Kivity
On 01/04/2011 04:55 PM, Anthony Liguori wrote: When the TCG thread, it needs to let the IO thread run for at least one iteration. Coordinating the execution of the IO thread such that it's guaranteed to run at least once and then having it drop the qemu mutex long enough for the TCG thread

Re: Role of qemu_fair_mutex

2011-01-04 Thread Anthony Liguori
On 01/04/2011 08:27 AM, Avi Kivity wrote: On 01/04/2011 04:17 PM, Anthony Liguori wrote: On 01/03/2011 04:01 AM, Avi Kivity wrote: On 01/03/2011 11:46 AM, Jan Kiszka wrote: Hi, at least in kvm mode, the qemu_fair_mutex seems to have lost its function of balancing qemu_global_mutex access betw

Re: Role of qemu_fair_mutex

2011-01-04 Thread Avi Kivity
On 01/04/2011 04:17 PM, Anthony Liguori wrote: On 01/03/2011 04:01 AM, Avi Kivity wrote: On 01/03/2011 11:46 AM, Jan Kiszka wrote: Hi, at least in kvm mode, the qemu_fair_mutex seems to have lost its function of balancing qemu_global_mutex access between the io-thread and vcpus. It's now onl

Re: Role of qemu_fair_mutex

2011-01-04 Thread Anthony Liguori
On 01/03/2011 04:01 AM, Avi Kivity wrote: On 01/03/2011 11:46 AM, Jan Kiszka wrote: Hi, at least in kvm mode, the qemu_fair_mutex seems to have lost its function of balancing qemu_global_mutex access between the io-thread and vcpus. It's now only taken by the latter, isn't it? This and the fac

Re: Role of qemu_fair_mutex

2011-01-03 Thread Avi Kivity
On 01/03/2011 12:03 PM, Jan Kiszka wrote: Am 03.01.2011 11:01, Avi Kivity wrote: > On 01/03/2011 11:46 AM, Jan Kiszka wrote: >> Hi, >> >> at least in kvm mode, the qemu_fair_mutex seems to have lost its >> function of balancing qemu_global_mutex access between the io-thread and >> vcpus. It'

Re: Role of qemu_fair_mutex

2011-01-03 Thread Jan Kiszka
Am 03.01.2011 11:01, Avi Kivity wrote: > On 01/03/2011 11:46 AM, Jan Kiszka wrote: >> Hi, >> >> at least in kvm mode, the qemu_fair_mutex seems to have lost its >> function of balancing qemu_global_mutex access between the io-thread and >> vcpus. It's now only taken by the latter, isn't it? >> >> T

Re: Role of qemu_fair_mutex

2011-01-03 Thread Avi Kivity
On 01/03/2011 11:46 AM, Jan Kiszka wrote: Hi, at least in kvm mode, the qemu_fair_mutex seems to have lost its function of balancing qemu_global_mutex access between the io-thread and vcpus. It's now only taken by the latter, isn't it? This and the fact that qemu-kvm does not use this kind of l

Role of qemu_fair_mutex

2011-01-03 Thread Jan Kiszka
Hi, at least in kvm mode, the qemu_fair_mutex seems to have lost its function of balancing qemu_global_mutex access between the io-thread and vcpus. It's now only taken by the latter, isn't it? This and the fact that qemu-kvm does not use this kind of lock made me wonder what its role is and if i