On Tue, Jun 03, 2003 at 08:56:59AM -0600, M. Warner Losh wrote: > In message: <20030603134717.GD35187_at_survey.codeburst.net> > Paul Richards <paul_at_freebsd-services.com> writes: > : You should look at kobj, it's precisely this sort of dynamic > : dispatching that it was designed to support. > > Too bad it is a little slow and not MP safe in its implementation. Yes, but it has the right design philosophy for this sort of situation and should be researched as an example of how to solve these sorts of problems. I'm not sure the dispatch is slow enough to cause serious overhead in the context of the tasks being performed and it maybe could be improved a little. I'm not sure that kobj actually needs to be MP safe if the kobj struct is always embedded in a structure at a higher level i.e. a use of kobj in say the device driver code will not interact with it's use by say the linker code so the locking can be done on device driver or linker level structs. I think that's the case currently, though perhaps not something we've defined as part of the API, but there's no reason we could not do so and then that simplifies the use of kobj by avoiding having to add locks right at the very bottom of the structure tree where they wouldn't be needed. -- Tis a wise thing to know what is wanted, wiser still to know when it has been achieved and wisest of all to know when it is unachievable for then striving is folly. [Magician]Received on Tue Jun 03 2003 - 06:51:59 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:10 UTC