All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Demi Marie Obenour <demi@invisiblethingslab.com>
Cc: Xen developer discussion <xen-devel@lists.xenproject.org>,
	Wei Liu <wl@xen.org>, Anthony PERARD <anthony.perard@citrix.com>
Subject: Re: [PATCH] Use direct I/O for loop devices
Date: Thu, 20 Oct 2022 16:34:56 +0200	[thread overview]
Message-ID: <Y1FckIT6OHJ/x0Ri@mail-itl> (raw)
In-Reply-To: <20220817204634.1886-1-demi@invisiblethingslab.com>

[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2022-10-20 14:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17 20:46 [PATCH] Use direct I/O for loop devices Demi Marie Obenour
2022-08-18  7:02 ` Jan Beulich
2022-08-18 14:04   ` Demi Marie Obenour
2022-08-18 14:12     ` Jan Beulich
2022-08-18 14:24       ` Demi Marie Obenour
2022-10-20 14:34 ` Marek Marczykowski-Górecki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y1FckIT6OHJ/x0Ri@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=anthony.perard@citrix.com \
    --cc=demi@invisiblethingslab.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.