From owner-cvs-all Sat Feb 23 12:46:15 2002 Delivered-To: cvs-all@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id E8C7C37B402; Sat, 23 Feb 2002 12:46:10 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id B3150AE366; Sat, 23 Feb 2002 12:46:10 -0800 (PST) Date: Sat, 23 Feb 2002 12:46:10 -0800 From: Alfred Perlstein To: dillon@FreeBSD.org Cc: Seigo Tanimura , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/coda coda_venus.c src/sys/compat/linprocfs Message-ID: <20020223204610.GG80761@elvis.mu.org> References: <200202232030.g1NKU4m87533@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200202232030.g1NKU4m87533@freefall.freebsd.org> User-Agent: Mutt/1.3.27i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * dillon@FreeBSD.org [020223 12:30] wrote: > > : New locks are: > : > : - pgrpsess_lock which locks the whole pgrps and sessions, > : - pg_mtx which protects the pgrp members, and > : - s_mtx which protects the session members. > :... > > I see you are using mtx_lock_giant(). Thanks! That is precisely the > use it is designed for! > > -- > > Seigo, it looks like s_mtx can be turned into a pool mutex. Do you > mind if I make this change? > > - > > I would also like to document some of the routines. For example, > funsetownlst() has some rather complex locking requirements which > are not documented at all at the base of the routine. It would also > probably be a good idea for the two callers of this routine to assert > the sign of sio_pgid before calling funsetownlst(). pgfind() is also > only partially documented. And so forth. > > I also noticed that you are leaving PGRPSESS_SLOCK()'d while calling > ktrsetchildren() and ktrops(). This is the only place where > PGRPSESS_SLOCK() is used outside of its domain and if it is at all > possible to remove it I would remove it. If that isn't possible, then > both ktr*() routines *AND* VREF() and vrele() need to be documented in > regards to the process group session potentially being locked on call > (which I would be happy to do as well). Matt, any chance you can co-ordinate with jhb (or not) to add functionality to witness such that it can detect when a mutex is aquired while holding a pool mutex? -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message