Date: Tue, 27 Mar 2007 00:05:17 -0400 From: Kris Kennaway <kris@obsecurity.org> To: Ed Schouten <ed@fxq.nl> Cc: Divacky Roman <xdivac02@stud.fit.vutbr.cz>, hackers@freebsd.org Subject: Re: investigation of Giant usage in kernel Message-ID: <20070327040517.GB47764@xor.obsecurity.org> In-Reply-To: <20070304175550.GA18397@hoeg.nl> References: <20070304141136.GA4935@stud.fit.vutbr.cz> <20070304175550.GA18397@hoeg.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
--k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 04, 2007 at 06:55:50PM +0100, Ed Schouten wrote: > Hello, >=20 > 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: >=20 > 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? >=20 > 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 --k1lZvvs/B4yU6o8G Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGCJf9Wry0BWjoQKURArXTAKC5LPaJxFvOKAFe4HUaeOPO9F16FwCfb32G FQ7PY86X2IUNaSTx0FsQMkY= =QgAK -----END PGP SIGNATURE----- --k1lZvvs/B4yU6o8G--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070327040517.GB47764>