Re: userspace pagecache management tool

Andrew Morton
2007-03-04T04:36:00Z

On Sat, 3 Mar 2007 21:35:59 -0500 "Lee Revell" <rlrevell@joe-job.com> wrote:

> On 3/3/07, Andrew Morton <akpm@linux-foundation.org> wrote:
> > But yes, updatedb's pagecache usage will be mainly metadata, and this tool
> > doesn't address metadata pagecache, although it could do so.
> >
>
> With no kernel changes? How? I can't find an equivalent API to
> posix_fadvise() for metadata.
>

We can use mincore and fadvise against /dev/sda1, too.

mincore's linear search would hurt but you could just run fadvise
regularly. A lot of the blockdev pagecache is pretty useless anyway: we've
already copied it much of it into dentries and inodes, and some of ext2/3/4's
pagecache is already pinned by the fs.