Date: Mon, 20 Mar 2000 13:29:51 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Julian Elischer <julian@elischer.org> Cc: Poul-Henning Kamp <phk@FreeBSD.ORG>, current@FreeBSD.ORG Subject: Re: B_WRITE cleanup patch, please test! Message-ID: <200003202129.NAA71883@apollo.backplane.com> References: <20502.952948995@critter.freebsd.dk> <38CCEF68.41C67EA6@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <dillon@backplane.com> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003202129.NAA71883>