lkml.org 
[lkml]   [2006]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drop page cache of a single file
On Wed, Dec 27, 2006 at 07:49:59PM -0800, Andrew Morton wrote:
> On Thu, 28 Dec 2006 11:17:25 +0800
> "Zhang, Yanmin" <yanmin_zhang@linux.intel.com> wrote:
>
> > Currently, by /proc/sys/vm/drop_caches, applications could drop pagecache,
> > slab(dentries and inodes), or both, but applications couldn't choose to
> > just drop the page cache of one file. An user of VOD (Video-On-Demand)
> > needs this capability to have more detailed control on page cache release.
>
> The posix_fadvise() system call should be used for this. Probably in
> combination with sys_sync_file_range().

Yanmin: I've been using the fadvise tool from
http://www.zip.com.au/~akpm/linux/patches/stuff/ext3-tools.tar.gz

It's a nice tool:

% fadvise
Usage: fadvise filename offset length advice [loops]
advice: normal sequential willneed noreuse dontneed asyncwrite writewait
% fadvise /var/sparse 0 0x7fffffff dontneed

Regards,
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-12-28 08:25    [W:0.061 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site