lkml.org 
[lkml]   [2002]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectO_STREAMING has insufficient info - how about fadvise() ?
    From
    Date
    On Thu, 2002-10-10 at 04:29, Erik Andersen wrote:
    > I don't think grep is a very good candidate for O_STREAMING. I
    > usually want the stuff I grep to stay in cache. O_STREAMING is
    > much better suited to applications like ogle, vlc, xine, xmovie,
    > xmms etc since there is little reason for the OS to cache things
    > like songs and movies you aren't likely to hear/see again any
    > time soon.

    Im not sure O_STREAMING is what you actually want here, its proper
    working drop behind. That -shouldnt- need a magic flag if the kernel is
    doing the VM things right.

    For streaming media writes you want a thread (we lack aio_fsync it
    seems), you do a regular asynchronous fsync to keep the buffering
    smooth.

    For streaming media read the kernel ought to be able to get it right,
    and if not then I'd much rather the kernel gave _me_ total control

    Instead of O_STREAMING therefore I'd much prefer to have

    fadvise(filehandle, offset, length, FADV_DONTNEED);

    Its quite possible that most of the rest of the madvise notions aren't
    worth implementing, but we have the flexibility to do. The fadvise
    interface also lets you pick which ranges you evict, so now I can do
    streaming media but not fadvise out of cache key frames so that my
    chapter starts just happen to generally be in cache as do a few I frames
    behind the read pointer - (for rewind).

    Do that with O_STREAMING ?

    Alan

    -
    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:29    [W:4.295 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site