[lkml]   [2003]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: madvise on file pages
"Muthian S" <> wrote:
> Hi,
> Could someone inform as to what is the behavior when madvise DONTNEED is
> called on pages that are mmap'd from local files mapped with MAP_SHARED,
> i.e. they share the same page that the file cache does.

The pages are unmapped from the calling process's pagetables. We don't
actually free the physical pages.

> In such cases, can
> madvise be made to release specific pages in the file cache by mmap-ing the
> relevant file segment ?


2.6 kernels implement the fadvise() syscall (accessible by glibc's
posix_fadvise() function) which will do this.

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: 2005-03-22 13:47    [W:0.030 / U:0.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site