I think the biggest win in regards to being able to arbitrarily stack
devices is to NOT attempt to forward struct buf's between devices when
non-trivial manipulation is required, and instead to make struct buf's
cheap enough that a device can simply allocate a new one and copy the
appropriate fields. Here I am talking about situations where devices
need callbacks (making forwarding impossible), need to split or combine
requests, or do other non-trivial things.
In particular I really hate all the various b_*blkno fields. b_lblkno,
b_blkno, and b_pblkno. It is precisely due to the existance of these
hacks that arbitrary device stacking is difficult.
The key to making a struct buf cheap is to provide an I/O path that
does not require the b_data KVA mapping. Once we provide this path,
I think everything else will fall into place quite neatly.
-Matt
Matthew Dillon
<[EMAIL PROTECTED]>
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message