Rx: avoid lock churn in rxi_ReceiveAckPacket
authorJeffrey Altman <jaltman@your-file-system.com>
Sun, 19 Sep 2010 16:35:03 +0000 (09:35 -0700)
committerDerrick Brashear <shadow@dementia.org>
Mon, 20 Sep 2010 08:53:00 +0000 (01:53 -0700)
commitc59ce29602086f795d5fbaef6a5f88fae9dd2dea
treef10b87d8c666158f241ffe43f604b9f651b67021
parent449976acd54ff46fd6cdb9a6e12acf3789665bcf
Rx: avoid lock churn in rxi_ReceiveAckPacket

rxi_ReceiveAckPacket can acquire and drop the conn_data_lock several
times and acquires and drops the peer_lock unnecessarily.  This patchset
adds a variable to track whether the conn_data_lock is held in order
to avoid the need to drop it and reacquire it based upon conditional
operations.  It also relocates the peer->maxPacketSize computations
in order to consolidate the work performed under the peer_lock.

Change-Id: I0bc9e42e8ef198a04315f9f2df529073ce9dfd03
Reviewed-on: http://gerrit.openafs.org/2781
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/rx/rx.c