Re: [Qemu-devel] [RFC for-2.7] block: keep AioContext pointer in BlockBackend

2016-05-17 Thread Paolo Bonzini
On 17/05/2016 13:14, Max Reitz wrote: >> That could be another BdrvChild member, couldn't it? > > I think it would rather require a new function pointer in > BdrvChildRole (after Kevin's series, that is). Yes, that's what I meant. :) Paolo signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [RFC for-2.7] block: keep AioContext pointer in BlockBackend

2016-05-17 Thread Max Reitz
On 17.05.2016 13:07, Paolo Bonzini wrote: > > > On 17/05/2016 12:52, Max Reitz wrote: >> A trivial way to do this would be to query the BDS's AIO context in >> blk_get_aio_context() and update the BB's context if they don't match. >> The more correct way would probably be to make bdrv_attach_aio_

Re: [Qemu-devel] [RFC for-2.7] block: keep AioContext pointer in BlockBackend

2016-05-17 Thread Paolo Bonzini
On 17/05/2016 12:52, Max Reitz wrote: > A trivial way to do this would be to query the BDS's AIO context in > blk_get_aio_context() and update the BB's context if they don't match. > The more correct way would probably be to make bdrv_attach_aio_context() > update its BB's (or BBs', in the future

Re: [Qemu-devel] [RFC for-2.7] block: keep AioContext pointer in BlockBackend

2016-05-17 Thread Max Reitz
On 11.04.2016 16:14, Stefan Hajnoczi wrote: > blk_get/set_aio_context() delegate to BlockDriverState without storing > the AioContext pointer in BlockBackend. > > There are two flaws: > > 1. BlockBackend falls back to the QEMU main loop AioContext when there >is no root BlockDriverState. Thi

Re: [Qemu-devel] [RFC for-2.7] block: keep AioContext pointer in BlockBackend

2016-05-11 Thread Stefan Hajnoczi
On Tue, May 10, 2016 at 12:38:17PM +0200, Paolo Bonzini wrote: > On 10/05/2016 11:33, Stefan Hajnoczi wrote: > >> > > >> > I'm not sure I agree with #2, as we should move away for the > >> > super-coarse AioContext lock (it is heavyweight and it doesn't play well > >> > with multiqueue). Atomics

Re: [Qemu-devel] [RFC for-2.7] block: keep AioContext pointer in BlockBackend

2016-05-10 Thread Paolo Bonzini
On 10/05/2016 11:33, Stefan Hajnoczi wrote: >> > >> > I'm not sure I agree with #2, as we should move away for the >> > super-coarse AioContext lock (it is heavyweight and it doesn't play well >> > with multiqueue). Atomics can be used for statistics, while the >> > time-based accounting probab

Re: [Qemu-devel] [RFC for-2.7] block: keep AioContext pointer in BlockBackend

2016-05-10 Thread Stefan Hajnoczi
On Mon, May 09, 2016 at 06:48:12PM +0200, Paolo Bonzini wrote: > > > On 11/04/2016 16:14, Stefan Hajnoczi wrote: > > 1. BlockBackend falls back to the QEMU main loop AioContext when there > >is no root BlockDriverState. This means the drive loses its > >AioContext during media change and

Re: [Qemu-devel] [RFC for-2.7] block: keep AioContext pointer in BlockBackend

2016-05-09 Thread Paolo Bonzini
On 11/04/2016 16:14, Stefan Hajnoczi wrote: > 1. BlockBackend falls back to the QEMU main loop AioContext when there >is no root BlockDriverState. This means the drive loses its >AioContext during media change and would break dataplane. > > 2. BlockBackend state used from multiple threa

[Qemu-devel] [RFC for-2.7] block: keep AioContext pointer in BlockBackend

2016-04-11 Thread Stefan Hajnoczi
blk_get/set_aio_context() delegate to BlockDriverState without storing the AioContext pointer in BlockBackend. There are two flaws: 1. BlockBackend falls back to the QEMU main loop AioContext when there is no root BlockDriverState. This means the drive loses its AioContext during media cha