Re: [PATCH] O_STREAMING - flag for optimal streaming I/O

From: Mark Mielke (mark@mark.mielke.cc)
Date: Wed Oct 09 2002 - 12:05:17 EST


On Wed, Oct 09, 2002 at 10:33:25AM +0200, Giuliano Pochini wrote:
> > The point of O_STREAMING is one change: drop pages in the pagecache
> > behind our current position, that are free-able, because we know we will
> > never want them.
> Does it drop pages unconditionally ? What happens if I do a
> streaming_cat largedatabase > /dev/null while other processes
> are working on it ? It's not a good thing to remove the whole
> cached data other apps are working on.

Anybody could make the cache thrash. I don't see this as an argument against
O_STREAMING (whether explicitly activated, or dynamically activated).

The only extension I would suggest (I don't think the patch did this?)
is that pages should only be candidates for being forgotten if all
open files associated with the page are O_STREAMING and all seek
points for all open files are beyond the page.

This would allow for a web app, or similar, that was serving the same
document over two different sockets, to provide a compromise between
O_STREAMING and not O_STREAMING where performance would suffer, but
for the common case, where only one person is accessing the file, the
full benefit of O_STREAMING would be realized.

Does the patch allow for mmap() to benefit from O_STREAMING?
"I intend to access this virtual memory range sequentially..."

mark

-- 
mark@mielke.cc/markm@ncf.ca/markm@nortelnetworks.com __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada

One ring to rule them all, one ring to find them, one ring to bring them all and in the darkness bind them...

http://mark.mielke.cc/

- 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/



This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:31 EST