From 037928cb1cd927f065eb9d76953990ba5233afe5 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 18 Feb 2008 17:29:16 +0000 Subject: [PATCH] DEVEL15-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. (cherry picked from commit 5fd85f53f26ba1f0649b8a8c68d3abb1c5159eb9) --- src/rx/rx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rx/rx.c b/src/rx/rx.c index 484a432b4..d6a4d0b13 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -7094,6 +7094,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); -- 2.39.5