The app _can't_ know, so nothing should use O_STREAMING?
I think the idea seems good - if a page requested for streaming
happens to be in cache already, don't mark it for early eviction.
This approach ensures that streaming apps don't affect the caches
of other apps at all. There are way too many cases where
streaming is useful but we don't know if others might be using
the pages - perhaps in other ways.
Consider searching _all_ files on disk for some string. Clearly
a cache-killer that would benefit from streaming, without
streaming this pushes everything else from cache except
for the last files searched.
But streaming that unconditionally marks pages for eviction
will also kill all cache in this case. Both data and binaries.
Streaming that only evicts pages it _brought in_ can
search the entire disk (or some reasonable but large subset)
leaving almost all other cache intact.
Now, if we could make updatedb use this kind of streaming
for its directory traversals... :-)
Helge Hafting
-
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/