lkml.org 
[lkml]   [2002]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] O_STREAMING - flag for optimal streaming I/O
Playing the devil's advocate here...  I didn't see this earlier (when
was it discussed, I can't see it looking back either), so sorry if
this sounds circular or I'm going over stuff that has been discussed
before... but...


On Tue, Oct 08, 2002 at 02:49:09PM -0400, Robert Love wrote:

> In other words, this flag pretty much disables the pagecache for
> this mapping, although we happily keep it around for write-behind
> and read-ahead. But once the data is behind us and safe to kill, we
> do. It is manual drop-behind.

OK. What might use this though? What applications might want to
disable the page-cache but still use write-behind?

> O_DIRECT has a lot of semantics, one of which is to attempt to
> minimize cache effects.

It depends on the OS. Some OS are broken and treat O_DIRECT as a
hint, Linux and IRIX know it's a *requirement*.

> O_STREAMING would be for your TiVo or network audio streamer. Any
> file I/O that is inherently sequential and access-once. No point
> trashing the pagecache with its data - but otherwise the behavior is
> normal.

Actually, this sounds perfect for O_DIRECT. But I don't know much
about streaming video.

Since you only want the data once, why use the page-cache at all and
needlessly copy? Certainly, the requirements for O_DIRECT are not
that hard to meet or implement.


Don't get me wrong, I'm not saying this is a bad thing at all. The
patch is small and elegant so it's hard to object; I'm just trying to
understand where in practice I would use this over O_DIRECT.



--cw
-
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:0.131 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site