]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
1) Fix up locking in nfs_up() and nfs_down.
authorMohan Srinivasan <mohans@FreeBSD.org>
Mon, 20 Nov 2006 04:14:23 +0000 (04:14 +0000)
committerMohan Srinivasan <mohans@FreeBSD.org>
Mon, 20 Nov 2006 04:14:23 +0000 (04:14 +0000)
commita18c4dc336f42899e76166bd92acae6ec4e201e3
tree22448b979900be4a7abc581a7184beaa4c286b09
parent276096bb3e7a62042fd7b9b44aff4023580f663c
1) Fix up locking in nfs_up() and nfs_down.
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.
- 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.

Reported by: Kris Kennaway
sys/nfsclient/nfs.h
sys/nfsclient/nfs_socket.c