From owner-cvs-src@FreeBSD.ORG Mon Nov 20 16:17:58 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D2E8116A407 for ; Mon, 20 Nov 2006 16:17:58 +0000 (UTC) (envelope-from mohan_srinivasan@yahoo.com) Received: from web30809.mail.mud.yahoo.com (web30809.mail.mud.yahoo.com [68.142.200.152]) by mx1.FreeBSD.org (Postfix) with SMTP id 44ECC43D9A for ; Mon, 20 Nov 2006 16:16:09 +0000 (GMT) (envelope-from mohan_srinivasan@yahoo.com) Received: (qmail 89511 invoked by uid 60001); 20 Nov 2006 16:16:00 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=NpF9Ap7aU6liFf+XISveP19yaAa2SIZaYm7X0EGm5yaXnWQRCa8MkzdXWRA9z2eFbvrDwfGL4zjbr2fKZRS/7QkCmiGWm6YNog5BgCceMYkp7b+yHB09eunASihL177MPCA0Zl+vLTiiYdC32Iih+0Nrgf36ViAx7IpCFWck2vU= ; Message-ID: <20061120161600.89495.qmail@web30809.mail.mud.yahoo.com> X-YMail-OSG: oe8DkLMVM1lgmQFy1oQmdq3z2VBrAeaBoSjEf4D5Im0Er8b7dEC.wprU69iAlzW5gn5wwt3PiLHijJe1I.7zX0M3hjXgbupI5Z1W0RI3bPuoHMX3CW_6GuKOaCU.anEwLbdmXUERsjk- Received: from [71.139.34.214] by web30809.mail.mud.yahoo.com via HTTP; Mon, 20 Nov 2006 08:16:00 PST Date: Mon, 20 Nov 2006 08:16:00 -0800 (PST) From: Mohan Srinivasan To: Bruce Evans In-Reply-To: <20061121010050.P25283@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/nfsclient nfs.h nfs_socket.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2006 16:17:58 -0000 --- Bruce Evans wrote: > > 2) Reduce the acquisitions of the Giant lock in the nfs_socket.c paths significantly. > > - We don't need to acquire Giant before tsleeping on lbolt anymore, > > since jhb specialcased lbolt handling in msleep. > > - nfs_up() needs to acquire Giant only if printing the "server up" > > message. > > Giant isn't required here either. tprintf() does its own locking as > required. This locking happens to be Giant locking, and callers > unfortunately have to be aware of this to avoid LORs. It may be > necessary to acquire at a higher level, but fortunately, most calls > to tprintf() are already at a high level, and since you've managed > to push down the calls here, the calls are apparently already at > a high level. Thanks. I'll fix this. > Giant was never required for plain printf(). nfs_printf() was never > needed since it only wraps plain printf() with Giant locking. > > > - nfs_timer() held Giant for the duration of the NFS timer processing, > > just because the printing of the message in nfs_down() needed it > > (and we acquire other locks in nfs_timer()). The acquisition of > > Giant is moved down into nfs_down() now, reducing the time Giant is > > held in that path. > > Like nfs_up(). Yes. I had to re-work some of the locking in nfs_timer() to push Giant into nfs_down(), to make the call to tprintf() a "higher level" call in that path. mohan