On 22/11/2014 13:33, Ming Lei wrote: > > these patches are interesting. I would like to compare them with the > > opposite approach (and, I think, more similar to your old work) where > > the qemu_laio_state API is moved entirely into AioContext, with lazy > > allocation (reference-counted too, probably). > > Yes, it can be done in that way, but the feature is linux native aio > specific, so it might not be good to put it into AioContext.
I think it's not a problem as long as the eventfd and io queue is created lazily. My main issue with these series is that aio_attach_aio_bs() (and detach) feels like a very ad hoc API. Adding io queue support directly in AioContext sounds better. > Basically most of the implementation should be same, and the > difference should be where the io queue is put. Yes, the change is not big. Paolo