Received: from eggs.gnu.org ([2001:4830:134:3::10]:58270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHRrs-00040i-QM for qemu-devel@nongnu.org; Wed, 13 Aug 2014 02:17:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHRrn-00053b-Q0 for qemu-devel@nongnu.org; Wed, 13 Aug 2014 02:17:04 -0400 Received: from len.romanrm.net ([5.39.87.147]:37733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHRrn-000531-Ke for qemu-devel@nongnu.org; Wed, 13 Aug 2014 02:16:59 -0400 Date: Wed, 13 Aug 2014 12:16:54 +0600 From: Roman Mamedov Message-ID: <20140813121654.1f1782e8@natsu> In-Reply-To: <53EB003F.9000303@msgid.tls.msk.ru> References: <20140812193530.70d0aa63@natsu> <53EA28DB.8060807@msgid.tls.msk.ru> <53EB003F.9000303@msgid.tls.msk.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/fZSEKhVaPM507Vfh7Mhmcoh"; protocol="application/pgp-signature" Subject: Re: [Qemu-devel] Bug#757927: [qemu-kvm] TRIM (discard=unmap) broken in 2.1 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: Kevin Wolf , 757927@bugs.debian.org, ambru@redhat.com, qemu-devel --Sig_/fZSEKhVaPM507Vfh7Mhmcoh Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 13 Aug 2014 10:05:51 +0400 Michael Tokarev wrote: > BTW, I found a system here with an SSD which supports discard, and tried = my > guests against it -- everything works fine when I use sata/ahci, but it b= reaks > indeed when using the default IDE interface. Hello, Thanks for working on this! Sorry for not being able to test an updated version sooner. Something to note, you do not need any TRIM-capable hardware such as SSD on= the host to take advantage of TRIM passthrough. Just place the RAW format VM di= sk image on any filesystem which supports sparse files (e.g. Ext4 or Btrfs), a= nd when the guest system issues a TRIM, when using "discard=3Dunmap" the VM im= age file will be "re-sparsifyed" on the host filesystem, deallocating all the TRIMed areas from disk storage, in effect it will take much less space on d= isk than before: http://s.lowendshare.com/7/1407910491.666.2014-07-16T130602Z-trim.png I was only successful in using this with the virtual IDE interface disks on Qemu/KVM 2.0, the virtio mode does not seem to support TRIM; did not try wi= th sata/ahci. --=20 With respect, Roman --Sig_/fZSEKhVaPM507Vfh7Mhmcoh Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlPrAtYACgkQTLKSvz+PZwginwCeNSzjtzDWHiA7/qqDRfD79HxN ay4AnjrMjegHbGmI22E5SCFEP+mhP01f =p7oD -----END PGP SIGNATURE----- --Sig_/fZSEKhVaPM507Vfh7Mhmcoh--