bflush algorithm
lars
lars at myab.UUCP
Fri Nov 7 20:36:12 AEST 1986
In article <244 at miduet.gec-mi-at.co.uk> jgh at gec-mi-at.co.uk (Jeremy Harris) writes:
>After bflush finds a delayed-write block and asynch-writes it, it scans again
>from the start of the freelist
>
>I assume this is for safety in case some other process inserts a delayed-write
>block on the freelist, but who will do this?
...
>o The disk driver strategy routine called by bwrite? I see no
> reason for it to manipulate the freelist.
...
>Jeremy Harris jgh at gec-mi-at.co.uk ...!mcvax!ukc!hrc63!miduet!jgh
In fact, strategy usually manipulates the free list, or at least
the free list pointers of its bp. These pointers are used for
maintaining an internal (to strategy) sorted list of disk operations.
This implies that bp->av_forw is not valid after a call to
strategy with bp. This is easily solved with an extra variabel
which "saves" the forward link before the call to strategy.
We implemented this scheme, plus an extra test:
After the whole free list was taken care of, the whole procedure
was restarted if and only if any buffer really was "flushed".
System performance on a sync was much improved.
By the way, we use 2000 buffers (UNIX System V.2) with 8 Mbytes of RAM.
What is the optimal number of buffers regarded to size of memory ?
--
______________________________________________________
Lars Pensjo
{decvax,philabs}!mcvax!enea!chalmers!myab!lars
More information about the Comp.unix.wizards
mailing list