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
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 ?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:36 EST