[lkml]   [2006]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] the /proc/filecache interface
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?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-06-15 02:42    [W:0.062 / U:0.664 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site