All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: "Denis V. Lunev" <den@openvz.org>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <fam@euphon.net>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org,
	Max Reitz <mreitz@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>, John Snow <jsnow@redhat.com>
Subject: Re: [PATCH 0/2] block: propagate discard alignment from format drivers to the guest
Date: Fri, 19 Jun 2020 12:20:04 -0400	[thread overview]
Message-ID: <20200619162004.GA9925@habkost.net> (raw)
In-Reply-To: <20200611171608.22052-1-den@openvz.org>

On Thu, Jun 11, 2020 at 08:16:06PM +0300, Denis V. Lunev wrote:
> Nowaday SCSI drivers in guests are able to align UNMAP requests before
> sending to the device. Right now QEMU provides an ability to set
> this via "discard_granularity" property of the block device which could
> be used by management layer.
> 
> Though, in particular, from the point of QEMU, there is
> pdiscard_granularity on the format driver level, f.e. on QCOW2 or iSCSI.
> It would be beneficial to pass this value as a default for this
> property.

I assume the value is visible to the guest.  What is supposed to
happen if live migrating and the block backend is a different one
on the destination?

Also, don't we have mechanisms to change the block backend change
at run time?  What should happen in that case?

> 
> Technically this should reduce the amount of use less UNMAP requests
> from the guest to the host. Basic test confirms this. Fedora 31 guest
> during 'fstrim /' on 32 Gb disk has issued 401/415 requests with/without
> proper alignment to QEMU.
> 
> Changes from v2:
> - 172 iotest fixed
> 
> Changes from v1:
> - fixed typos in description
> - added machine type compatibility layer as suggested by Kevin
> 
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> CC: Kevin Wolf <kwolf@redhat.com>
> CC: Max Reitz <mreitz@redhat.com>
> CC: Eduardo Habkost <ehabkost@redhat.com>
> CC: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> CC: John Snow <jsnow@redhat.com>
> CC: Paolo Bonzini <pbonzini@redhat.com>
> CC: Fam Zheng <fam@euphon.net>
> 
> 

-- 
Eduardo



  parent reply	other threads:[~2020-06-19 16:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 17:16 [PATCH 0/2] block: propagate discard alignment from format drivers to the guest Denis V. Lunev
2020-06-11 17:16 ` [PATCH 1/2] " Denis V. Lunev
2020-06-11 17:16 ` [PATCH 2/2] iotests: fix 172 test Denis V. Lunev
2020-06-11 17:21 ` pls consider this is [v3] Re: [PATCH 0/2] block: propagate discard alignment from format drivers to the guest Denis V. Lunev
2020-06-19  8:38   ` Denis V. Lunev
2020-06-19 16:20 ` Eduardo Habkost [this message]
2020-06-19 16:27   ` Denis V. Lunev
2020-06-26  8:17 ` Denis V. Lunev
2020-07-03 17:36 ` Denis V. Lunev

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=20200619162004.GA9925@habkost.net \
    --to=ehabkost@redhat.com \
    --cc=den@openvz.org \
    --cc=fam@euphon.net \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.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.