Re: [Qemu-devel] [RFC v3 09/13] cpus.c: introduce simple callback support

2015-07-10 Thread Frederic Konrad
On 10/07/2015 12:24, Paolo Bonzini wrote: On 10/07/2015 11:47, alvise rigo wrote: I tried to use it, but it would then create a deadlock at a very early stage of the stress test. The problem is likely related to the fact that flush_queued_work happens with the global mutex locked. Let's fix th

Re: [Qemu-devel] [RFC v3 09/13] cpus.c: introduce simple callback support

2015-07-10 Thread Paolo Bonzini
On 10/07/2015 11:47, alvise rigo wrote: > I tried to use it, but it would then create a deadlock at a very early > stage of the stress test. > The problem is likely related to the fact that flush_queued_work > happens with the global mutex locked. Let's fix that and move the global mutex inside

Re: [Qemu-devel] [RFC v3 09/13] cpus.c: introduce simple callback support

2015-07-10 Thread alvise rigo
On Fri, Jul 10, 2015 at 11:53 AM, Frederic Konrad wrote: > On 10/07/2015 11:47, alvise rigo wrote: >> >> I tried to use it, but it would then create a deadlock at a very early >> stage of the stress test. >> The problem is likely related to the fact that flush_queued_work >> happens with the globa

Re: [Qemu-devel] [RFC v3 09/13] cpus.c: introduce simple callback support

2015-07-10 Thread Frederic Konrad
On 10/07/2015 11:47, alvise rigo wrote: I tried to use it, but it would then create a deadlock at a very early stage of the stress test. The problem is likely related to the fact that flush_queued_work happens with the global mutex locked. As Frederick suggested, we can use the newly introduced

Re: [Qemu-devel] [RFC v3 09/13] cpus.c: introduce simple callback support

2015-07-10 Thread alvise rigo
I tried to use it, but it would then create a deadlock at a very early stage of the stress test. The problem is likely related to the fact that flush_queued_work happens with the global mutex locked. As Frederick suggested, we can use the newly introduced flush_queued_safe_work for this. Regards,

Re: [Qemu-devel] [RFC v3 09/13] cpus.c: introduce simple callback support

2015-07-10 Thread Paolo Bonzini
On 10/07/2015 10:23, Alvise Rigo wrote: > In order to perfom "lazy" TLB invalidation requests, introduce a > queue of callbacks at every vCPU disposal that will be fired just > before entering the next TB. > > Suggested-by: Jani Kokkonen > Suggested-by: Claudio Fontana > Signed-off-by: Alvise

[Qemu-devel] [RFC v3 09/13] cpus.c: introduce simple callback support

2015-07-10 Thread Alvise Rigo
In order to perfom "lazy" TLB invalidation requests, introduce a queue of callbacks at every vCPU disposal that will be fired just before entering the next TB. Suggested-by: Jani Kokkonen Suggested-by: Claudio Fontana Signed-off-by: Alvise Rigo --- cpus.c| 34 ++