Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!husc6!seismo!mcvax!enea!chalmers!myab!lars From: lars@myab.UUCP (lars) Newsgroups: comp.unix.wizards Subject: Re: bflush algorithm Message-ID: <151@myab.UUCP> Date: Fri, 7-Nov-86 05:36:12 EST Article-I.D.: myab.151 Posted: Fri Nov 7 05:36:12 1986 Date-Received: Mon, 10-Nov-86 06:15:03 EST References: <244@miduet.gec-mi-at.co.uk> Reply-To: lars@myab.UUCP (lars) Organization: Myab Gothenburg, Sweden Lines: 32 Keywords: bflush In article <244@miduet.gec-mi-at.co.uk> jgh@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@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