qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Richard W.M. Jones" <rjones@redhat.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org,
	Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes.
Date: Mon, 30 Jul 2012 15:57:51 +0200	[thread overview]
Message-ID: <501692DF.5090904@redhat.com> (raw)
In-Reply-To: <20120730135136.GE2701@amd.home.annexia.org>

Il 30/07/2012 15:51, Richard W.M. Jones ha scritto:
>> > Or just finish up discard support and use the existing fstrim command of
>> > qemu-ga.  :)
> What's actually involved to do this?  I noticed that a virtio-scsi on
> qcow2 v3 device exported to the guest does not appear to support TRIM
> at all (see attached test script and output).

The most basic thing to do is to pass -device discard_granularity=NNN,
where NNN should be the cluster size of the device.  On top of this you
need to add the ability to do TRIM asynchronously, quite some testing,
and perhaps improving the disk formats so that they support
sector-granularity discard.

Patches for asynchronous TRIM are in the works (the threadpool patches
on the list are the first step).

Long term I would like the ability to distinguish
discard-for-thin-provisioning ("may cause fragmentation, all subsequent
accesses could be slower") from discard-for-wear-leveling ("only the
first subsequent access would be slowed down").  This requires changes
at all levels (host kernel, QEMU, management, guest kernel, and possibly
guest applications).

Paolo

  reply	other threads:[~2012-07-30 13:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-26 15:59 [Qemu-devel] [PATCH] Detect zero writes (for discussion only, not to be applied) Richard W.M. Jones
2012-07-26 15:59 ` [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes Richard W.M. Jones
2012-07-27 13:58   ` Anthony Liguori
2012-07-27 19:01     ` Paolo Bonzini
2012-07-30 13:51       ` Richard W.M. Jones
2012-07-30 13:57         ` Paolo Bonzini [this message]
2012-07-30 14:03           ` Eric Blake
2012-07-30 14:09             ` Paolo Bonzini
2012-07-30 14:38               ` Kevin Wolf
2012-07-30 15:52                 ` Richard W.M. Jones
2012-07-27 13:55 ` [Qemu-devel] [PATCH] Detect zero writes (for discussion only, not to be applied) Anthony Liguori
2012-07-27 15:14   ` Richard W.M. Jones

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=501692DF.5090904@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).