[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Use direct I/O for loop devices



On Wed, Aug 17, 2022 at 04:46:34PM -0400, Demi Marie Obenour wrote:
> This is a huge performance improvement for two reasons:
> 
> 1. It uses the filesystem’s asynchronous I/O support, rather than using
>    synchronous I/O.
> 2. It bypasses the page cache, removing a redundant layer of caching and
>    associated overhead.

Cross-posting here just in case: this patch breaks block script on
devices with 4k block size, at least with some util-linux versions.
More details at https://github.com/QubesOS/qubes-issues/issues/7828

> ---
>  tools/hotplug/Linux/block | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/hotplug/Linux/block b/tools/hotplug/Linux/block
> index 
> 2691b56951c9b82094471a141b9e0bed04abb929..75785f3a5422c4a5f962a4cd4f6acae5080d036d
>  100644
> --- a/tools/hotplug/Linux/block
> +++ b/tools/hotplug/Linux/block
> @@ -330,7 +330,7 @@ mount it read-write in a guest domain."
>          else
>            roflag=''
>          fi
> -        do_or_die losetup $roflag "$loopdev" "$file"
> +        do_or_die losetup --direct-io=on $roflag "$loopdev" "$file"
>          xenstore_write "$XENBUS_PATH/node" "$loopdev"
>          write_dev "$loopdev"
>          release_lock "block"
> -- 
> Sincerely,
> Demi Marie Obenour (she/her/hers)
> Invisible Things Lab
> 

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

Attachment: signature.asc
Description: PGP signature


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.