Re: dvd+rw-tools update [6.0, DVD-R DL]
Bill Davidsen <email@example.com> wrote:
> >I was thinking that a simple wrapper to open() which adds
> >O_DIRECT might be sufficient, but it turned out that this
> >alone is not sufficient: the buffers used by the programs
> >must have a certain alignment. This is not guaranteed
> >without modifying the way how those programs allocate
> I played with this a bit, if you are using higher level calls you can
> replace fopen() with an open() using O_DIRECT, an fdopen() after that,
> and a setbuffer() to get a big alligned buffer in place. I did that just
> to see if I could get a gain without doing a bunch of code which might
> be non-portable in practice. The main benefit was to have less impact on
> the rest of the system, the i/o in the program didn't run that much faster.
O_DIRECT is no standard and it seems that it is just a reimplementation of the
very old DG/UX idea of O_DG_UNBUFFERED.
Note that what you get with this feature is less than what you get from a
decent VM & buffer subsystem.
When I added O_DG_UNBUFFERED support into star 11 years ago, it turned out that
DG/UX with O_DG_UNBUFFERED was still _much_ slower than reading from a standard
fd on Solaris.
EMail:firstname.lastname@example.org (home) Jörg Schilling D-13353 Berlin
email@example.com (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily