qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Chris Wedgwood <cw@f00f.org>
Cc: pbonzini@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-ga: add guest-fstrim command
Date: Sat, 23 Jun 2012 15:54:30 -0500	[thread overview]
Message-ID: <20120623205430.GA7553@illuin> (raw)
In-Reply-To: <20120623033851.GA10913@puku.stupidest.org>

On Fri, Jun 22, 2012 at 08:38:51PM -0700, Chris Wedgwood wrote:
> > I'm not sure I understand, wouldn't the filesystem need to be involved
> > at some level? How can the block layer differentiate lazilly discarded data
> > blocks from ones that are still in use without the aid of the
> > filesystem?
> 
> It might be me that doesn't understand.
> 
> Yes, the filesystem is involved.  Current linux filesystems can trim
> on demand or using fstrim.  That mechanism seems to be like it should
> suffice if exposed in the most common cases.
> 

You mean the "discard" mount option? I don't think that's generally enabled by
default due to the performance impact on bare metal. A periodic,
filesystem-wide call (like the FITRIM ioctl) is probably the better approach in
those cases as well.

I'm not sure what the penalty of auto-discard would be in the case of VMs, but
there would be at least some additional overhead there due the hole punching
operations run by the host, and the only use case I can think of where it's
useful in that context is for reducing the size of the images before we do some
work with them on the host, in which case an explicit FITRIM ioctl beforehand
makes the most sense IMO.

  reply	other threads:[~2012-06-23 20:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21 23:04 [Qemu-devel] [PULL] qemu-ga patches for guest-fstrim command Michael Roth
2012-06-21 23:04 ` [Qemu-devel] [PATCH 1/2] qemu-ga: make names more generic for mount list functions Michael Roth
2012-06-21 23:04 ` [Qemu-devel] [PATCH 2/2] qemu-ga: add guest-fstrim command Michael Roth
2012-06-22 17:48   ` Chris Wedgwood
2012-06-22 21:12     ` Michael Roth
2012-06-23  3:38       ` Chris Wedgwood
2012-06-23 20:54         ` Michael Roth [this message]
2012-06-24 16:33     ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2012-06-12 10:50 [Qemu-devel] [PATCH 0/2] qemu-ga: Add " Paolo Bonzini
2012-06-12 10:50 ` [Qemu-devel] [PATCH 2/2] qemu-ga: add " Paolo Bonzini
2012-06-12 19:54   ` Luiz Capitulino
2012-06-12 21:05   ` Michael Roth
2012-06-13  5:31     ` Paolo Bonzini

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=20120623205430.GA7553@illuin \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=cw@f00f.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).