Re: [Qemu-devel] [RFC 6/8] linux-user: Support CPU work queue

2016-07-01 Thread Sergey Fedorov
On 01/07/16 11:56, Sergey Fedorov wrote: > On 30/06/16 13:35, Sergey Fedorov wrote: >> On 30/06/16 13:32, Alex Bennée wrote: >>> Sergey Fedorov writes: >>> On 29/06/16 19:17, Alex Bennée wrote: > So I think there is a deadlock we can get with the async work: > > (gdb) thread apply

Re: [Qemu-devel] [RFC 6/8] linux-user: Support CPU work queue

2016-07-01 Thread Sergey Fedorov
On 30/06/16 13:35, Sergey Fedorov wrote: > On 30/06/16 13:32, Alex Bennée wrote: >> Sergey Fedorov writes: >> >>> On 29/06/16 19:17, Alex Bennée wrote: So I think there is a deadlock we can get with the async work: (gdb) thread apply all bt Thread 11 (Thread 0x7ffefeca7700

Re: [Qemu-devel] [RFC 6/8] linux-user: Support CPU work queue

2016-06-30 Thread Sergey Fedorov
On 30/06/16 13:32, Alex Bennée wrote: > Sergey Fedorov writes: > >> On 29/06/16 19:17, Alex Bennée wrote: >>> So I think there is a deadlock we can get with the async work: >>> >>> (gdb) thread apply all bt >>> >>> Thread 11 (Thread 0x7ffefeca7700 (LWP 2912)): >>> #0 pthread_cond_wait@@GLIBC_2.3.

Re: [Qemu-devel] [RFC 6/8] linux-user: Support CPU work queue

2016-06-30 Thread Alex Bennée
Sergey Fedorov writes: > On 29/06/16 19:17, Alex Bennée wrote: >> So I think there is a deadlock we can get with the async work: >> >> (gdb) thread apply all bt >> >> Thread 11 (Thread 0x7ffefeca7700 (LWP 2912)): >> #0 pthread_cond_wait@@GLIBC_2.3.2 () at >> ../sysdeps/unix/sysv/linux/x86_64/p

Re: [Qemu-devel] [RFC 6/8] linux-user: Support CPU work queue

2016-06-30 Thread Sergey Fedorov
On 29/06/16 19:17, Alex Bennée wrote: > So I think there is a deadlock we can get with the async work: > > (gdb) thread apply all bt > > Thread 11 (Thread 0x7ffefeca7700 (LWP 2912)): > #0 pthread_cond_wait@@GLIBC_2.3.2 () at > ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185 > #1 0x

Re: [Qemu-devel] [RFC 6/8] linux-user: Support CPU work queue

2016-06-29 Thread Alex Bennée
Sergey Fedorov writes: > From: Sergey Fedorov > > Make CPU work core functions common between system and user-mode > emulation. User-mode does not have BQL, so flush_queued_work() is > protected by 'exclusive_lock'. > > Signed-off-by: Sergey Fedorov > Signed-off-by: Sergey Fedorov > --- > cp

Re: [Qemu-devel] [RFC 6/8] linux-user: Support CPU work queue

2016-06-29 Thread Sergey Fedorov
On 27/06/16 12:31, Alex Bennée wrote: > Sergey Fedorov writes: > >> diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h >> index c1f59fa59d2c..23b4b50e0a45 100644 >> --- a/include/exec/exec-all.h >> +++ b/include/exec/exec-all.h >> @@ -407,4 +407,8 @@ extern int singlestep; >> extern C

Re: [Qemu-devel] [RFC 6/8] linux-user: Support CPU work queue

2016-06-27 Thread Alex Bennée
Sergey Fedorov writes: > From: Sergey Fedorov > > Make CPU work core functions common between system and user-mode > emulation. User-mode does not have BQL, so flush_queued_work() is > protected by 'exclusive_lock'. > > Signed-off-by: Sergey Fedorov > Signed-off-by: Sergey Fedorov > --- > cp

[Qemu-devel] [RFC 6/8] linux-user: Support CPU work queue

2016-06-19 Thread Sergey Fedorov
From: Sergey Fedorov Make CPU work core functions common between system and user-mode emulation. User-mode does not have BQL, so flush_queued_work() is protected by 'exclusive_lock'. Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov --- cpu-exec-common.c | 83 +