From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KanHL-00022K-Fv for qemu-devel@nongnu.org; Wed, 03 Sep 2008 03:59:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KanHG-0001sy-Vp for qemu-devel@nongnu.org; Wed, 03 Sep 2008 03:59:50 -0400 Received: from [199.232.76.173] (port=60921 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KanHG-0001ss-T9 for qemu-devel@nongnu.org; Wed, 03 Sep 2008 03:59:46 -0400 Received: from ecfrec.frec.bull.fr ([129.183.4.8]:52607) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KanHG-0002ge-L6 for qemu-devel@nongnu.org; Wed, 03 Sep 2008 03:59:46 -0400 Subject: RE: [Qemu-devel][PATCH,RFC] Zero cluster dedup From: Laurent Vivier In-Reply-To: References: Content-Type: text/plain; charset=UTF-8 Date: Wed, 03 Sep 2008 09:59:36 +0200 Message-Id: <1220428776.4159.12.camel@frecb07144> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Shahar Frank Le mercredi 03 septembre 2008 =C3=A0 00:35 -0700, Shahar Frank a =C3=A9cr= it : > > -----Original Message----- > > From: Laurent Vivier [mailto:Laurent.Vivier@bull.net] > > Sent: Wednesday, September 03, 2008 10:10 AM > > To: qemu-devel@nongnu.org > > Cc: Shahar Frank > > Subject: Re: [Qemu-devel][PATCH,RFC] Zero cluster dedup > >=20 > >=20 > > Is it really needed to have a shared zero page ? > >=20 > > When I read qcow_read() and qcow_aio_read_cb() I see: > >=20 > > if (!cluster_offset) { > > ... > > memset(buf, 0, 512 * n); > > ... > > } > > and so I think you have just to clear the l2_table entry for the > given > > clusters (and free them). >=20 > You are correct if this is a standalone image i.e. without backing > file. If the image has a backing file, a zero mapping is interpreted > as "read it from the backing file at the same (logical) offset".=20 I think backing file is also qcow2, so if you write all zeros the behavior will be the same, and read from the backing file will use also memset(). Did you try ? Regards, Laurent --=20 ----------------- Laurent.Vivier@bull.net ------------------ "La perfection est atteinte non quand il ne reste rien =C3=A0 ajouter mais quand il ne reste rien =C3=A0 enlever." Saint Exup=C3=A9ry