lkml.org 
[lkml]   [2003]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: cache limit
Erik Andersen <andersen@codepoet.org> wrote:
>
> On Mon Aug 18, 2003 at 11:20:24PM -0700, Andrew Morton wrote:
> > Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua> wrote:
> > >
> > > There was a discussion (and patches) in the middle of 2.5 series
> > > about O_STREAMING open flag which mean "do not aggressively cache
> > > this file". Targeted at MP3/video playing, copying large files and such.
> > >
> > > I don't know whether it actually was merged. If it was,
> > > your program can use it.
> >
> > It was not. Instead we have fadvise. So it would be appropriate to change
> > applications such as rsync to optionally run
> >
> > posix_fadvise(fd, 0, -1, POSIX_FADV_DONTNEED)
> >
> > against file descriptors just before closing them, so all the pagecache
> > gets thrown away. (Well, most of the pagecache - dirty pages won't get
> > dropped - the app must fsync the files by hand first if it wants this)
>
> This is not supported in 2.4.x though, right?

No, it is not.

> What if I don't want to fill up the pagecache with garbage in the
> first place?

Call fadvise(POSIX_FADV_DONTNEED) more frequently or use O_DIRECT.

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