Mail Archives: djgpp-workers/1998/07/28/02:57:16
Martin Str|mberg wrote:
>
> According to Eli Zaretskii:
> >
> > On Sun, 26 Jul 1998, Martin Str|mberg wrote:
> >
> > > I suppose that there is no way to flush the _write_ cache and not the
> > > read cache?
>
> [Klippa, klapp, kluppit DOZE mess.]
>
> > In any case, the call to `sync' before running a child program doesn't
> > even need to flush the write cache. It just needs to make sure output
> > to the same file/device doesn't appear out-of-order, for which the DOS
> > CommitFile function is enough. IMHO, this is simply a DOS bug (it
> > should have done that in our stead, inside its Exec function) which we
> > are working around. I can hardly believe any Unix box calls `sync',
> > since the `sync' system call is typically prohibitively expensive on
> > Unix (it takes several seconds even on fast machines).
>
> No, I was thinking the sync call. It's such a waste to forget the read
> cache, when it's not necessary.
>
> And sync on my machine (Linux) doesn't take several seconds. Less than
> one, actually, and it's not idle.
I think it will depend on what the system is doing. On Unix, it's
traditional for the `update' daemon to call `sync' every 30 seconds or
so, so if it's been fairly idle since then, there won't be much to do.
If the system is heavily loaded, on the other hand (try `cd
/usr/src/linux; make -j 9999 &'), it will be slow.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -