From: "Patrick J. LoPresti" <lopresti@gmail.com>
To: Andrea Righi <andrea@betterlinux.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH v3 0/2] fadvise: support POSIX_FADV_NOREUSE
Date: Tue, 12 Jul 2011 14:52:49 -0700 [thread overview]
Message-ID: <8762n7kvym.fsf@cmungerjr.com> (raw)
In-Reply-To: <20110627123946.GB1658@thinkpad>
> IIUC, NOREUSE means "the application will use this range of the file
> once". It's something that we do _before_ accessing the file. And the
> kernel needs to remember the ranges of NOREUSE data for each file, so
> that page cache can be immediately dropped after the data has been
> accessed (if possible).
I am no expert on the Linux page cache, but my applications have a great
interest in exercising some control over it...
Could NOREUSE be as simple as setting a bit on the page that means
"never mark this page active"?
Or more conservatively, "clear this bit before marking the page active"?
So POSIX_FADV_NOREUSE would set the bit on the page. Then any operation
that would normally mark the page active would instead merely clear the
bit. This would keep the page on the inactive list _after_ the first
read and allow it to be reclaimed, which is at least in the "spirit" of
NOREUSE.
- Pat
next prev parent reply other threads:[~2011-07-12 21:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-24 13:49 [PATCH v3 0/2] fadvise: support POSIX_FADV_NOREUSE Andrea Righi
2011-06-24 13:49 ` [PATCH v3 1/2] mm: introduce __invalidate_mapping_pages() Andrea Righi
2011-06-26 22:46 ` Rik van Riel
2011-06-27 7:05 ` Andrea Righi
2011-06-24 13:49 ` [PATCH v3 2/2] fadvise: implement POSIX_FADV_NOREUSE Andrea Righi
2011-06-26 22:47 ` Rik van Riel
2011-06-27 7:05 ` Andrea Righi
2011-06-27 3:04 ` [PATCH v3 0/2] fadvise: support POSIX_FADV_NOREUSE KOSAKI Motohiro
2011-06-27 7:11 ` Andrea Righi
2011-06-27 7:42 ` KOSAKI Motohiro
2011-06-27 10:17 ` Pádraig Brady
2011-06-27 10:29 ` Andrea Righi
2011-06-27 11:53 ` Pádraig Brady
2011-06-27 12:39 ` Andrea Righi
2011-07-12 21:52 ` Patrick J. LoPresti [this message]
2011-07-12 22:22 ` Andrea Righi
2011-07-13 0:36 ` Patrick J. LoPresti
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=8762n7kvym.fsf@cmungerjr.com \
--to=lopresti@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andrea@betterlinux.com \
--cc=linux-kernel@vger.kernel.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