• Jiufei Xue's avatar
    ovl: implement async IO routines · 2406a307
    Jiufei Xue authored
    A performance regression was observed since linux v4.19 with aio test using
    fio with iodepth 128 on overlayfs.  The queue depth of the device was
    always 1 which is unexpected.
    
    After investigation, it was found that commit 16914e6f ("ovl: add
    ovl_read_iter()") and commit 2a92e07e ("ovl: add ovl_write_iter()")
    resulted in vfs_iter_{read,write} being called on underlying filesystem,
    which always results in syncronous IO.
    
    Implement async IO for stacked reading and writing.  This resolves the
    performance regresion.
    
    This is implemented by allocating a new kiocb for submitting the AIO
    request on the underlying filesystem.  When the request is completed, the
    new kiocb is freed and the completion callback is called on the original
    iocb.
    Signed-off-by: default avatarJiufei Xue <jiufei.xue@linux.alibaba.com>
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    2406a307
file.c 16 KB