Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Nov 2006 08:16:00 -0800 (PST)
From:      Mohan Srinivasan <mohan_srinivasan@yahoo.com>
To:        Bruce Evans <bde@zeta.org.au>
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
Message-ID:  <20061120161600.89495.qmail@web30809.mail.mud.yahoo.com>
In-Reply-To: <20061121010050.P25283@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--- Bruce Evans <bde@zeta.org.au> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061120161600.89495.qmail>