Re: [Qemu-devel] [RFC 03/10] cpus: Introduce async_wait_run_on_cpu()

2016-06-13 Thread Alex Bennée
alvise rigo writes: > I think that async_safe_run_on_cpu() does a different thing: it > queries a job to the target vCPU and wants all the other to "observe" > the submitted task. However, we will have the certainty that only the > target vCPU observed the task, the other might still be running

Re: [Qemu-devel] [RFC 03/10] cpus: Introduce async_wait_run_on_cpu()

2016-06-08 Thread alvise rigo
I think that async_safe_run_on_cpu() does a different thing: it queries a job to the target vCPU and wants all the other to "observe" the submitted task. However, we will have the certainty that only the target vCPU observed the task, the other might still be running in the guest code. alvise On

Re: [Qemu-devel] [RFC 03/10] cpus: Introduce async_wait_run_on_cpu()

2016-06-08 Thread Alex Bennée
Sergey Fedorov writes: > On 08/06/16 17:10, alvise rigo wrote: >> Using run_on_cpu() we might deadlock QEMU if other vCPUs are waiting >> for the current vCPU. We need to exit from the vCPU loop in order to >> avoid this. > > I see, we could deadlock indeed. Alternatively, we may want fix > run_

Re: [Qemu-devel] [RFC 03/10] cpus: Introduce async_wait_run_on_cpu()

2016-06-08 Thread Sergey Fedorov
On 08/06/16 17:10, alvise rigo wrote: > Using run_on_cpu() we might deadlock QEMU if other vCPUs are waiting > for the current vCPU. We need to exit from the vCPU loop in order to > avoid this. I see, we could deadlock indeed. Alternatively, we may want fix run_on_cpu() to avoid waiting for comple

Re: [Qemu-devel] [RFC 03/10] cpus: Introduce async_wait_run_on_cpu()

2016-06-08 Thread alvise rigo
Using run_on_cpu() we might deadlock QEMU if other vCPUs are waiting for the current vCPU. We need to exit from the vCPU loop in order to avoid this. Regards, alvise On Wed, Jun 8, 2016 at 3:54 PM, Alex Bennée wrote: > > Alvise Rigo writes: > >> Introduce a new function that allows the calling

Re: [Qemu-devel] [RFC 03/10] cpus: Introduce async_wait_run_on_cpu()

2016-06-08 Thread Alex Bennée
Alvise Rigo writes: > Introduce a new function that allows the calling VCPU to add a work item > to another VCPU (aka target VCPU). This new function differs from > async_run_on_cpu() since it makes the calling VCPU waiting for the target > VCPU to finish the work item. The mechanism makes use o

[Qemu-devel] [RFC 03/10] cpus: Introduce async_wait_run_on_cpu()

2016-05-26 Thread Alvise Rigo
Introduce a new function that allows the calling VCPU to add a work item to another VCPU (aka target VCPU). This new function differs from async_run_on_cpu() since it makes the calling VCPU waiting for the target VCPU to finish the work item. The mechanism makes use of the halt_cond to wait and in