Andrea Arcangeli wrote:
>
> On Wed, 12 Jan 2000, Ananth Ananthanarayanan wrote:
>
> >The first reference is immediately dropped after its use
> >in generic_file_read(), after the data has been copied to user.
> >The last reference can be dropped by invalidate_inode_pages(),
> >which leaves one reference (for the buffers) as you point out.
>
> Yes.
>
> >Now truncate_inode_pages() removes the buffers associated with
> >a page (through block_flushpage()), so if i use
> >truncate_inode_pages(inode, 0) will that remove the page
> >from the page cache, remove the buffers & free the page to
> >the system wide free pool?
>
> With truncate_inode_pages you won't leak but you'll destroy also the dirty
> cache.
>
Since I'm only using the rig to test read performance,
that'll be ok for now ... my pages are all clean :-)
BTW, don't see an option in open(2) or fcntl(2) whereby
the caches associated with a file can be nullified,
including writing back any dirty buffers. Is there
a clean way to do this programatically with existing
system calls?
ananth.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:21 EST