[vdr] Patch to avoid file system buffer trashing
rmvdr at bj-ig.de
Tue Aug 23 09:22:36 CEST 2005
On Montag 22 August 2005 20:43, Clemens Kirchgatterer wrote:
> Ralf Müller <rmvdr at bj-ig.de> wrote:
> > For sure the whole thing only makes sense when all programs dealing
> > with video streams on a vdr do the same. So I did some first steps
> > patching noad.
> very interesting. i would suggest, that vdr should wrap all relevant
> calls into its own APIs and make it public to plugins.
Yes - it would be interesting to have that functionality in core vdr.
> you could write defines for (f)open, read(), write(), ... and
> redirect them to your replacements, so at least plugins that deal
> with reading from harddisk by themselfs, would benefit instantly.
From my point of view I would like to _know_ what I call. Thatwhy I
choose the names OpenStream(), ReadStream() ... just to make clear what
kind of file is meant. I know in plain vdr there are only two types
files - tiny ones which will be read nearly atomic; for which it makes
nearly no difference if they will be cached or not and the streaming
type of file. The point is the _nearly_ no difference. I came to the
point of writing this patch because the filesystem structure and the
small info.vdr files where out of buffer cache all the time they where
needed. To only read all the info.vdr files on my machine takes 6
seconds when they are not already buffered - when wrapping read(),
write() by #defines they would never go into buffer cache. Thats not
what I want.
Van Roy's Law: -------------------------------------------------------
An unbreakable toy is useful for breaking other toys.
More information about the vdr