From owner-p4-projects@FreeBSD.ORG Thu Jul 6 08:40:30 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2B8AD16A519; Thu, 6 Jul 2006 08:40:30 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF58416A4FE; Thu, 6 Jul 2006 08:40:29 +0000 (UTC) (envelope-from mux@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 878A743D5A; Thu, 6 Jul 2006 08:40:27 +0000 (GMT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 3A7FD1A4E21; Thu, 6 Jul 2006 01:40:27 -0700 (PDT) Date: Thu, 6 Jul 2006 10:40:27 +0200 From: Maxime Henrion To: Scott Long Message-ID: <20060706084027.GW8070@elvis.mu.org> References: <200607060348.k663mTHW007992@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200607060348.k663mTHW007992@repoman.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: Perforce Change Reviews Subject: Re: PERFORCE change 100686 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2006 08:40:30 -0000 Scott Long wrote: > http://perforce.freebsd.org/chv.cgi?CH=100686 > > Change 100686 by scottl@scottl-wv1u on 2006/07/06 03:47:59 > > Use a sleep mutex to protect kernel environment handling instead of > an sx lock. The sx lock seemed to only be used to get around the > copyout case in kenv(KENV_DUMP) path. Fix that path to safely use a > sleep lock instead. Actually, the sx lock was not used for that but simply for the usual reason we use sx locks: to allow multiple readers to read the kernel environment in parallel. This is just FYI, I don't mind you changing it to a mutex, since kenv() is quite rarely used and it probably doesn't benefit much from the sx lock (it may even get pessimized by it). Cheers, Maxime