Re: Disk IO - coss and ufs with common IO engines.

From: Robert Collins <robertc@dont-contact.us>
Date: Sun, 31 Aug 2003 20:57:47 +1000

On Sun, 2003-08-31 at 12:08, Adrian Chadd wrote:
> On Sat, Aug 30, 2003, Robert Collins wrote:
>
> > The only step missing to be able to use the IO modules from anywhere is
> > automatic registration to be 'synced' at shutdown, and 'callback()'
> > checked on each io loop.
>
> If you want to use the async io code rom anywhere, say, logfile writing,
> you're _going_ to have to do write combining or your write queue is going
> to quickly blow out to a stupid size. The store IO interface really assures
> us there's only one outstanding write per object at a time, unless
> something whacked has change which I haven't yet picked up on.

This isn't the store IO interface. Each DiskFile can have multiple
outstanding requests, both read or write. This is a requirement of COSS.

> Funnily enough, if you check out src/disk.c, you'll find some stuff which
> was done many, many, many moons ago to deal with async write combining.

Yah, long term I'd like to push disk.c into the DiskIO infrastructure,
and remove the common file_* functions completely.

> Just 2c. Yes, it'd be nice to have true async writes for logfiles and such.
> But you're going to have to do write combining.

Nope. That is a user-of-the-interface problem, it's not appropriate to
force the interface to police this.

We can certainly provide a write-combining Decorator though.
Conceptually such a layer would:
wrap the IOStrategy to return a decorated instance.
wrap the DiskFile objects to intercept write's.
Queue writes per File in memory, and when callback() is called, flush
the queue to the real objects.

Maybe 200 lines of code for the interested.

Cheers,
Rob

-- 
GPG key available at: <http://members.aardvark.net.au/lifeless/keys.txt>.

Received on Sun Aug 31 2003 - 04:57:55 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:31 MST