All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Gerhard Wiesinger <lists@wiesinger.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] TRIM, UNMAP and QCOW2 release of block information - Thin provisioning
Date: Wed, 15 Aug 2012 15:06:25 +0200	[thread overview]
Message-ID: <502B9ED1.6080609@redhat.com> (raw)
In-Reply-To: <CAJSP0QVZ-KNCs_2gm1oQ2V+bCBe9LxZc5wzkt4Fgtm=ReMQnCg@mail.gmail.com>

Am 13.08.2012 10:31, schrieb Stefan Hajnoczi:
> On Sun, Aug 12, 2012 at 8:00 PM, Gerhard Wiesinger <lists@wiesinger.com> wrote:
>> As far as I saw QEMU/KVM supports the trim command on IDE/SATA devices and
>> the UNMAP command on SCSI devices/disks (thanks Paolo Bonzini). Will the
>> qcow2 format (or other formats) use this information and also release the
>> blocks for thin provisioning to save disk space on filesystems?
>>
>> VirtualBox also has such a feature in the new beta version:
>> http://www.fb-developers.info/blog/2012/virtualbox-v4-2-is-coming/
> 
> This has recently been discussed, please search the list for more info
> from Kevin Wolf or Paolo Bonzini.
> 
> qcow2 marks the discarded blocks as free and will reuse them in future
> allocations.  It does *not* discard at the OS level.
> 
> For raw files you can get discard to work on an xfs host file system.
> In the future ext4 support can also be added.

The problem with it is that passing discards through to the file system,
or even handling them at all isn't always wanted. It is already a slow
operation for itself, but it also makes the next write access slower and
can cause fragmentation.

So you'd really want some more options to configure it, and I believe to
achieve what we want, changes are not only required to qemu, but to both
host and guest kernel. Paolo is looking into this.

Btw, the more interesting news for me in the VBox link you posted is
that they seem to have implemented QED, qcow1, and read-only qcow2.

Kevin

      reply	other threads:[~2012-08-15 13:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-12 19:00 [Qemu-devel] TRIM, UNMAP and QCOW2 release of block information - Thin provisioning Gerhard Wiesinger
2012-08-13  8:31 ` Stefan Hajnoczi
2012-08-15 13:06   ` Kevin Wolf [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=502B9ED1.6080609@redhat.com \
    --to=kwolf@redhat.com \
    --cc=lists@wiesinger.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /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.