Re: [Qemu-devel] [PATCH 19/19] block: make accounting thread-safe

2018-05-24 Thread Paolo Bonzini
On 24/05/2018 15:35, Alberto Garcia wrote: > On Mon 05 Jun 2017 02:39:08 PM CEST, Paolo Bonzini wrote: >> @@ -102,6 +107,8 @@ static void block_account_one_io(BlockAcctStats *stats, >> BlockAcctCookie *cookie, >> >> assert(cookie->type < BLOCK_MAX_IOTYPE); >> >> +

Re: [Qemu-devel] [PATCH 19/19] block: make accounting thread-safe

2018-05-24 Thread Alberto Garcia
On Thu 24 May 2018 03:35:50 PM CEST, Alberto Garcia wrote: > On Mon 05 Jun 2017 02:39:08 PM CEST, Paolo Bonzini wrote: >> @@ -102,6 +107,8 @@ static void block_account_one_io(BlockAcctStats *stats, >> BlockAcctCookie *cookie, >> >> assert(cookie->type < BLOCK_MAX_IOTYPE); >> >> +

Re: [Qemu-devel] [PATCH 19/19] block: make accounting thread-safe

2018-05-24 Thread Alberto Garcia
On Mon 05 Jun 2017 02:39:08 PM CEST, Paolo Bonzini wrote: > @@ -102,6 +107,8 @@ static void block_account_one_io(BlockAcctStats *stats, > BlockAcctCookie *cookie, > > assert(cookie->type < BLOCK_MAX_IOTYPE); > > +qemu_mutex_lock(>lock); QEMU crashes because this lock is not

Re: [Qemu-devel] [PATCH 19/19] block: make accounting thread-safe

2017-06-06 Thread Alberto Garcia
On Mon 05 Jun 2017 02:39:08 PM CEST, Paolo Bonzini wrote: > I'm not trying too hard yet. Later, with multiqueue support, > this may cause mutex contention or cacheline bouncing. > > Cc: Alberto Garcia > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Paolo

[Qemu-devel] [PATCH 19/19] block: make accounting thread-safe

2017-06-05 Thread Paolo Bonzini
I'm not trying too hard yet. Later, with multiqueue support, this may cause mutex contention or cacheline bouncing. Cc: Alberto Garcia Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/accounting.c | 16