]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Rx: only compute peer bytes sent and received if rx_stats_active
authorJeffrey Altman <jaltman@your-file-system.com>
Sun, 19 Sep 2010 16:47:37 +0000 (09:47 -0700)
committerDerrick Brashear <shadow@dementia.org>
Mon, 27 Sep 2010 15:29:39 +0000 (08:29 -0700)
commit6a8e622bbec9fd6263d621669208e26f88339391
treeef0d42656bf05cf203b9c514c706d41bdcf1e2f0
parentada57bb70e23fbb5ee52dd456b33c8cdd41885ff
Rx: only compute peer bytes sent and received if rx_stats_active

Computing the bytes sent and received is an expensive operation.
If rx statistics collection has been disabled we should not collect
the peer data.  The most expensive operation is the rx_FindPeer()
call that is performed during rxi_ReadPacket().  rxi_ReadPacket()
is processed by the rx listener thread which must be as fast as
possible.

Change-Id: I5403c88aa85f9049fe50a9c1f3dbaad7d8b802bd
Reviewed-on: http://gerrit.openafs.org/2782
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7d16c8b84ac8cc0251231819bfb0eefc2040322a)
Reviewed-on: http://gerrit.openafs.org/2807
src/rx/rx_packet.c