• S
    block: add bdrv_set_aio_context() · dcd04228
    Stefan Hajnoczi 提交于
    Up until now all BlockDriverState instances have used the QEMU main loop
    for fd handlers, timers, and BHs.  This is not scalable on SMP guests
    and hosts so we need to move to a model with multiple event loops on
    different host CPUs.
    
    bdrv_set_aio_context() assigns the AioContext event loop to use for a
    particular BlockDriverState.  It first detaches the entire
    BlockDriverState graph from the current AioContext and then attaches to
    the new AioContext.
    
    This function will be used by virtio-blk data-plane to assign a
    BlockDriverState to its IOThread AioContext.  Make
    bdrv_aio_set_context() public since data-plane should not include
    block_int.h.
    Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
    dcd04228
block_int.h 21.3 KB