From: Jeffrey Altman Date: Mon, 18 Feb 2008 17:27:48 +0000 (+0000) Subject: rx-stats-optimization-20080218 X-Git-Tag: BP-openafs-windows-kdfs-ifs~99 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5fd85f53f26ba1f0649b8a8c68d3abb1c5159eb9;p=packages%2Fo%2Fopenafs.git rx-stats-optimization-20080218 LICENSE IPL10 Do not grab the peer mutex or the rpc stats mutex if we are not intending to collect stats. Doing so is a bottleneck. --- diff --git a/src/rx/rx.c b/src/rx/rx.c index 946aa33ec..abd4f06f3 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -7090,6 +7090,9 @@ rx_IncrementTimeAndCount(struct rx_peer *peer, afs_uint32 rxInterface, int isServer) { + if (!(rxi_monitor_peerStats || rxi_monitor_processStats)) + return; + MUTEX_ENTER(&rx_rpc_stats); MUTEX_ENTER(&peer->peer_lock);