All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kwolf@redhat.com, "Richard W.M. Jones" <rjones@redhat.com>,
	Anthony Liguori <anthony@codemonkey.ws>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes.
Date: Mon, 30 Jul 2012 08:03:55 -0600	[thread overview]
Message-ID: <5016944B.8070501@redhat.com> (raw)
In-Reply-To: <501692DF.5090904@redhat.com>

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

On 07/30/2012 07:57 AM, Paolo Bonzini wrote:
> 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).

Ooh, nice bullet point to add to my upcoming presentation at Linux
Plumber's Conference in a month:
http://summit.linuxplumbersconf.org/lpc-2012/meeting/33/lpc2012-ref-improved-virt-disk-handling/

Does anyone else have some annoyances about large sparse file handling
where improving the kernel would make our life easier, that I should
incorporate into my discussion?

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]

  reply	other threads:[~2012-07-30 14:04 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
2012-07-30 14:03           ` Eric Blake [this message]
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=5016944B.8070501@redhat.com \
    --to=eblake@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@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 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.