Subject: Re: New patch (Re: RFC: addition of B_NESTED to buf.h and vfs_bio.c)
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Reinoud Zandijk <reinoud@netbsd.org>
List: tech-kern
Date: 01/08/2006 15:07:16
--SLDf9lqlvOQaIe6s
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sun, Jan 08, 2006 at 11:35:00AM +0900, YAMAMOTO Takashi wrote:
> > The main benefit to nesting is that an action on an (io)buf can be split up 
> > into several independently sheduled actions on the nested buf's like 
> > genfs's getpages/putpages do whatever the reason is. Genfs only uses a 
> > hardcoded mechanism to skip over dirty pages and the nested buffer 
> > implementation is a generalisation of this mechanism.
> 
> to me, it seems reverse.
> your proposed patch changes how to implement nested buffers,
> from B_CALL and b_private (generic way) to
> a special-purpose hook and members (less generic way).

The special-purpose hook (i think you mean b_masterbuf) is to allow the 
split up code in a routine that creates the nested buffers to use a 
b_private for its own use. The newest patch does use the B_CALL method to 
be less intrusive, see my latest patch.

The members are for diagnostic/debug only (now) and i've added them on 
request of Jason. They can be defined away when not running such a kernel.

> do you mean, you want to use the "another set of flags/values/callbacks"
> for your filesystem?  for what?

maybe my wording wasn't that clear but i meant to say that implementing it 
in this way the parts that do split up buffers dont have to know all 
details on the current buffer implementation's quirks. Especially if we're 
going to restreamline the buffer code, the less knowledge is needed for a 
correct operation the better otherwise odd bugs can suddenly show up.

A simple deligation system might be plausable in the future design to 
greatly reduce struct buf sizes and provide more customised design without 
the need for the overloading and/or adding of variables.

Regards,
Reinoud


--SLDf9lqlvOQaIe6s
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBQ8EcjIKcNwBDyKpoAQK8lQgAva0bU0aMMC5x8o7OKatU/0LWX4YCO9hi
+COlHZQ3ROckFzOqHBwPrwNN03Ew7DOTtti7bZkJ6Fj9rQfNWaFF+n7sxeuGy3v/
ai6K8I11hXLFgpQczDio/LReyAeEdzxWscO5SWWkZG7La7RL13ranYxkhZattCkx
jNyk0gJoHA1ywB2+2xHsUHJTGkatYFO1ZLtwQhjGbJyefpxKRl2MQpMmRP0V8PmJ
gNeGszOODl5JuZuwbVT/J3cAX2qmiN/Xv8cNN8NZgy7x5G5ZM12fZjxh0/ILbxzx
UyhEuhFAjeWjhdmKrsOuuBPZf5r2kJ6+LF1o8Vsn9YWfBu9DvWMOQg==
=awXM
-----END PGP SIGNATURE-----

--SLDf9lqlvOQaIe6s--