qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <Laurent.Vivier@bull.net>
To: qemu-devel@nongnu.org
Cc: Shahar Frank <shaharf@qumranet.com>
Subject: RE: [Qemu-devel][PATCH,RFC] Zero cluster dedup
Date: Wed, 03 Sep 2008 09:59:36 +0200	[thread overview]
Message-ID: <1220428776.4159.12.camel@frecb07144> (raw)
In-Reply-To: <ED2414DB5FBBCF4FA66ECE71F290E9A29B8143@EXVBE011-2.exch011.intermedia.net>

Le mercredi 03 septembre 2008 à 00:35 -0700, Shahar Frank a écrit :
> > -----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
> > 
> > 
> > Is it really needed to have a shared zero page ?
> > 
> > When I read qcow_read() and qcow_aio_read_cb() I see:
> > 
> > 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).
> 
> 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". 

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
-- 
----------------- Laurent.Vivier@bull.net  ------------------
  "La perfection est atteinte non quand il ne reste rien à
ajouter mais quand il ne reste rien à enlever." Saint Exupéry

  reply	other threads:[~2008-09-03  7:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-02 16:28 [Qemu-devel][PATCH,RFC] Zero cluster dedup Shahar Frank
2008-09-03  7:09 ` Laurent Vivier
2008-09-03  7:35   ` Shahar Frank
2008-09-03  7:59     ` Laurent Vivier [this message]
2008-09-03  8:13       ` Kevin Wolf
2008-09-03  8:25         ` Laurent Vivier
2008-09-03  9:38 ` Kevin Wolf
2008-09-03 12:05   ` Shahar Frank
2008-09-03 12:47     ` Kevin Wolf
2008-09-03 13:07       ` Shahar Frank
2008-09-03 13:12         ` Laurent Vivier
2008-09-03 17:44           ` Shahar Frank
2008-09-03 13:09       ` Laurent Vivier

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=1220428776.4159.12.camel@frecb07144 \
    --to=laurent.vivier@bull.net \
    --cc=qemu-devel@nongnu.org \
    --cc=shaharf@qumranet.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).