lkml.org 
[lkml]   [2006]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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?

Thanks,
Wu
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-15 02:42    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site