• Christoph Hellwig's avatar
    xfs simplify and speed up direct I/O completions · 209fb87a
    Christoph Hellwig authored
    Our current handling of direct I/O completions is rather suboptimal,
    because we defer it to a workqueue more often than needed, and we
    perform a much to aggressive flush of the workqueue in case unwritten
    extent conversions happen.
    
    This patch changes the direct I/O reads to not even use a completion
    handler, as we don't bother to use it at all, and to perform the unwritten
    extent conversions in caller context for synchronous direct I/O.
    
    For a small I/O size direct I/O workload on a consumer grade SSD, such as
    the untar of a kernel tree inside qemu this patch gives speedups of
    about 5%.  Getting us much closer to the speed of a native block device,
    or a fully allocated XFS file.
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
    Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
    209fb87a
xfs_aops.c 37.5 KB