On Sun, Mar 04, 2007 at 06:55:50PM +0100, Ed Schouten wrote: > Hello, > > I took a grep on the kernel source and took a look to Giant usage as > well. I too have a question about locking in uipc_domain.c: > > The file has a mutex, dom_mtx, which protects the 'domain list lock', > which could be declared static by the way. The strange thing is that it > isn't used to lock the domain list lock in any way. It is only used to > lock the domain_init_status variable. Wouldn't it be better to rename it > to something better? > > The pf_proto_register() routine locks and unlocks Giant. It looks like > s/Giant/dom_mtx/ would be enough to remove the usage of Giant from > uipc_domain.c.
This one doesn't seem to be a big deal because protocol registration is unlikely to happen in a critical path. i.e. a one-time Giant acquisition is completely irrelevant, it's the acquisitions that might happen hundreds or thousands of times a second in certain operational conditions that matter. I have updated the wiki with what seems to be a more or less complete list of the remaining Giant instances in the kernel: http://wiki.freebsd.org/SMPTODO Apart from some subsystems (ttys are the main one), and excluding the items that are being actively worked on (e.g. CAM), there is not much Giant left. Kris
pgpVAfAm59z3C.pgp
Description: PGP signature

