From: Fengguang Wu <fengguang.wu@gmail.com>
To: Bernard Blackham <b-lkml@blackham.com.au>
Cc: linux-kernel@vger.kernel.org, Lubos Lunak <l.lunak@suse.cz>,
Dirk Mueller <dmueller@suse.de>,
Badari Pulavarty <pbadari@us.ibm.com>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [RFC] the /proc/filecache interface
Date: Thu, 15 Jun 2006 08:40:34 +0800 [thread overview]
Message-ID: <350332007.09368@ustc.edu.cn> (raw)
Message-ID: <20060615004034.GA5013@mail.ustc.edu.cn> (raw)
In-Reply-To: <20060614153837.GA16601@ucc.gu.uwa.edu.au>
Hi Bernard,
On Wed, Jun 14, 2006 at 11:38:37PM +0800, Bernard Blackham wrote:
> I haven't been following this closely, so I apologise if I'm out of
> my depth. It would be a useful add-on to be able to use this
> interface to force something _out_ of the page cache also. For
> example, for performance tests, or selectively ditching pages before
> software suspending.
Sure we can add more related commands into it.
For example, the functions in fs/drop_caches.c are well suited for
this interface. The current sysctl interface is a quick hacking:
/* A global variable is a bit ugly, but it keeps the code simple */
int sysctl_drop_caches;
The following scheme may be more reasonable:
# echo -n "drop files" > /proc/filecache
# echo -n "drop slabs" > /proc/filecache
As for the "selectively ditching pages" function, my original scheme
is to
- query /proc/filecache to answer the question of "which pages
are cached, and their status(referenced/active etc.)"
- run "fadvise filename page-offset pages" to ditch pages
Do you think it as convenient?
Thanks,
Wu
next prev parent reply other threads:[~2006-06-15 0:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060612075130.GA5432@mail.ustc.edu.cn>
2006-06-12 7:51 ` [RFC] the /proc/filecache interface Fengguang Wu
2006-06-14 11:05 ` Pavel Machek
[not found] ` <20060614122934.GB6564@mail.ustc.edu.cn>
2006-06-14 12:29 ` Fengguang Wu
2006-06-14 15:38 ` Bernard Blackham
[not found] ` <20060615004034.GA5013@mail.ustc.edu.cn>
2006-06-15 0:40 ` Fengguang Wu [this message]
2006-06-15 2:05 ` Bernard Blackham
2006-06-14 21:19 ` Badari Pulavarty
[not found] ` <20060615010316.GB5013@mail.ustc.edu.cn>
2006-06-15 1:03 ` Fengguang Wu
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=350332007.09368@ustc.edu.cn \
--to=fengguang.wu@gmail.com \
--cc=akpm@osdl.org \
--cc=b-lkml@blackham.com.au \
--cc=dmueller@suse.de \
--cc=l.lunak@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=pbadari@us.ibm.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