From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 4 18:22:15 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 13B7016A400 for ; Sun, 4 Mar 2007 18:22:15 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (palm.hoeg.nl [83.98.131.212]) by mx1.freebsd.org (Postfix) with ESMTP id CF5C213C4A6 for ; Sun, 4 Mar 2007 18:22:14 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 2C7381CE74; Sun, 4 Mar 2007 18:55:50 +0100 (CET) Date: Sun, 4 Mar 2007 18:55:50 +0100 From: Ed Schouten To: hackers@freebsd.org Message-ID: <20070304175550.GA18397@hoeg.nl> References: <20070304141136.GA4935@stud.fit.vutbr.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fUYQa+Pmc3FrFX/N" Content-Disposition: inline In-Reply-To: <20070304141136.GA4935@stud.fit.vutbr.cz> User-Agent: Mutt/1.5.14 (2007-02-12) Cc: Divacky Roman Subject: Re: investigation of Giant usage in kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2007 18:22:15 -0000 --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. Yours, --=20 Ed Schouten WWW: http://g-rave.nl/ --fUYQa+Pmc3FrFX/N Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF6wgm52SDGA2eCwURAqCjAJ9ejEph3fcgNKhV+iJICaEJnZ2pQgCfWOMQ SAbzWmXW4chApkynYUVLBv4= =rEjn -----END PGP SIGNATURE----- --fUYQa+Pmc3FrFX/N--