* madvise on file pages
@ 2003-07-31 21:59 Muthian S
2003-07-31 22:32 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Muthian S @ 2003-07-31 21:59 UTC (permalink / raw)
To: linux-kernel
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. In such cases, can
madvise be made to release specific pages in the file cache by mmap-ing the
relevant file segment ?
thanks,
Muthian.
_________________________________________________________________
Play detective. Identify genuine Windows.
http://server1.msn.co.in/sp03/coa/index.asp Win cool prizes.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: madvise on file pages
2003-07-31 21:59 madvise on file pages Muthian S
@ 2003-07-31 22:32 ` Andrew Morton
2003-08-01 21:39 ` Antonio Vargas
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2003-07-31 22:32 UTC (permalink / raw)
To: Muthian S; +Cc: linux-kernel
"Muthian S" <muthian_s@hotmail.com> 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 ?
No.
2.6 kernels implement the fadvise() syscall (accessible by glibc's
posix_fadvise() function) which will do this.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: madvise on file pages
2003-07-31 22:32 ` Andrew Morton
@ 2003-08-01 21:39 ` Antonio Vargas
0 siblings, 0 replies; 3+ messages in thread
From: Antonio Vargas @ 2003-08-01 21:39 UTC (permalink / raw)
To: Andrew Morton; +Cc: Muthian S, linux-kernel
On Thu, Jul 31, 2003 at 03:32:11PM -0700, Andrew Morton wrote:
> "Muthian S" <muthian_s@hotmail.com> 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 ?
>
> No.
>
> 2.6 kernels implement the fadvise() syscall (accessible by glibc's
> posix_fadvise() function) which will do this.
Perhaps we could send the page to the least-used end of the page lists?
--
winden/network
1. Dado un programa, siempre tiene al menos un fallo.
2. Dadas varias lineas de codigo, siempre se pueden acortar a menos lineas.
3. Por induccion, todos los programas se pueden
reducir a una linea que no funciona.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-08-01 20:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-31 21:59 madvise on file pages Muthian S
2003-07-31 22:32 ` Andrew Morton
2003-08-01 21:39 ` Antonio Vargas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).