[lkml]   [2003]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: cache limit
    Denis Vlasenko <> 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 would be a useful addition to rsync and such applications - it is
    stronger and more specific and safer than banging on the VM for a special

    But if you want to bang on the VM for a special case, run 2.6 and set
    /proc/sys/vm/swappiness to zero during the rsync run.

    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.020 / U:2.244 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site