From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Dave Chinner <david@fromorbit.com>
Cc: John Stultz <john.stultz@linaro.org>,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Android Kernel Team <kernel-team@android.com>,
Robert Love <rlove@google.com>, Mel Gorman <mel@csn.ul.ie>,
Hugh Dickins <hughd@google.com>, Rik van Riel <riel@redhat.com>,
Dmitry Adamushko <dmitry.adamushko@gmail.com>,
Neil Brown <neilb@suse.de>, Andrea Righi <andrea@betterlinux.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: [PATCH 2/3] fadvise: Add _VOLATILE,_ISVOLATILE, and _NONVOLATILE flags
Date: Fri, 27 Apr 2012 08:25:40 -0700 [thread overview]
Message-ID: <4F9ABA74.8040404@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120427003953.GC9541@dastard>
On 04/26/2012 05:39 PM, Dave Chinner wrote:
> As it is, I'm still not sold on these being an fadvise() interface
> because all it really is a delayed hole punching interface whose
> functionailty is currently specific to tmpfs. The behaviour cannot
> be implemented sanely by anything else at this point.
...
> IOWs, the specification you are describing means that FADV_VOLATILE
> could be correctly implemented as an immediate hole punch by every
> filesystem that supports hole punching.
Ahhh, I think I see where you're going with this.
1. Data written to a file somehow (mmap(), write()) and is on disk
2. mmap() the data, and fault it in
3. Do a small write to it
4. set FADV_VOLATILE on it
Now we've got a dirty page which can theoretically be tossed out. But,
we've got old data on the disk and no real way to tell that it was old
if it got faulted in again. It's a much cleaner situation to just drop
that data off the disk (hole punch) than to leave it around. Is that
the concern?
But, we have other APIs that act this way, tossing out dirty data
without reflecting that on-disk (MADV_DONTNEED at least). Is it really
a stretch to define the FADV_VOLATILE to behave the same way? IOW,
Should the behavior _really_ be hole punching? That'll cost us I/O to
throw away data during memory reclaim since we have to go write the
information about the hole. Seems like a much more appropriate thing to
just toss the data out since the app can handle it.
next prev parent reply other threads:[~2012-04-27 15:30 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-24 17:49 [PATCH 0/3] Volatile Ranges John Stultz
2012-04-24 17:49 ` [PATCH 1/3] Range tree implementation John Stultz
2012-04-24 19:14 ` Peter Zijlstra
2012-04-24 19:25 ` John Stultz
2012-04-24 19:33 ` Peter Zijlstra
2012-04-25 12:16 ` Dmitry Adamushko
2012-04-25 16:19 ` John Stultz
2012-04-26 10:00 ` Dmitry Adamushko
2012-04-27 19:34 ` John Stultz
2012-04-24 17:49 ` [PATCH 2/3] fadvise: Add _VOLATILE,_ISVOLATILE, and _NONVOLATILE flags John Stultz
2012-04-24 19:20 ` Peter Zijlstra
2012-04-24 19:50 ` John Stultz
2012-04-27 0:39 ` Dave Chinner
2012-04-27 15:25 ` Dave Hansen [this message]
2012-04-28 1:36 ` Dave Chinner
2012-04-30 21:07 ` John Stultz
2012-05-01 0:08 ` Dave Chinner
2012-05-01 0:46 ` John Stultz
2012-05-01 1:28 ` Dave Chinner
2012-04-27 19:14 ` John Stultz
2012-04-28 2:04 ` Dave Chinner
2012-04-30 19:40 ` John Stultz
2012-05-01 0:28 ` Dave Chinner
2012-05-01 1:15 ` John Stultz
2012-05-01 1:51 ` Dave Chinner
2012-04-24 17:49 ` [PATCH 3/3] [RFC] ashmem: Convert ashmem to use volatile ranges John Stultz
2012-04-24 19:21 ` Peter Zijlstra
2012-04-24 19:42 ` John Stultz
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=4F9ABA74.8040404@linux.vnet.ibm.com \
--to=dave@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=andrea@betterlinux.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=david@fromorbit.com \
--cc=dmitry.adamushko@gmail.com \
--cc=hughd@google.com \
--cc=john.stultz@linaro.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=neilb@suse.de \
--cc=riel@redhat.com \
--cc=rlove@google.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).