From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvqZp-0001oK-10 for qemu-devel@nongnu.org; Mon, 30 Jul 2012 10:04:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SvqZj-0000JT-3e for qemu-devel@nongnu.org; Mon, 30 Jul 2012 10:04:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59036) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvqZi-0000JH-S4 for qemu-devel@nongnu.org; Mon, 30 Jul 2012 10:03:59 -0400 Message-ID: <5016944B.8070501@redhat.com> Date: Mon, 30 Jul 2012 08:03:55 -0600 From: Eric Blake MIME-Version: 1.0 References: <1343318389-28877-1-git-send-email-rjones@redhat.com> <1343318389-28877-2-git-send-email-rjones@redhat.com> <87txwt8fvl.fsf@codemonkey.ws> <5012E592.8010400@redhat.com> <20120730135136.GE2701@amd.home.annexia.org> <501692DF.5090904@redhat.com> In-Reply-To: <501692DF.5090904@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigF5F7843E379AA272BD72E65D" Subject: Re: [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, "Richard W.M. Jones" , Anthony Liguori , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF5F7843E379AA272BD72E65D Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 comman= d 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). >=20 > The most basic thing to do is to pass -device discard_granularity=3DNNN= , > 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. >=20 > Patches for asynchronous TRIM are in the works (the threadpool patches > on the list are the first step). >=20 > 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 possibl= y > 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-impro= ved-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? --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigF5F7843E379AA272BD72E65D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQFpRMAAoJEKeha0olJ0Nqt+0H/RkqEH+eTM9TFyV4S0TSYAaa Q3EkaG1+P0i+Tho21l1+Alk5Q0zG/vdk4MLRfNXpZViQS9/e0WkE3B+d0+ctKEjm RtE8D3fk3GX4cvxJ0jjh7QC/3L7rt8MRS3m3uWjIOf5pPTX9SJeUkJHfW5nlFC0k Vxu11dBFeS/Mqk7bjsggNnMZ42LCEmAjmUKK0uNWPzY5WMMoRtVekD+PF6hqYGfS HTGVV4lcnjyoh71evFE/9hhjIBNZrlO8/u0GY2lj9Kl4NEoAFRnps51aYzyBI+jI tFdofGORTdSrqcFQAD2UxeJEf/qJY98cLZKBAfTcYArsXhbQFpR4L4zbpkqIcp4= =DSlb -----END PGP SIGNATURE----- --------------enigF5F7843E379AA272BD72E65D--