rx: Don't call gettimeofday for every packet ack
authorSimon Wilkinson <sxw@your-file-system.com>
Tue, 5 Oct 2010 20:21:38 +0000 (21:21 +0100)
committerJeffrey Altman <jaltman@openafs.org>
Tue, 12 Oct 2010 17:32:19 +0000 (10:32 -0700)
commite16d7b7d6a6980fbda3186a578fb7e26fc334194
tree92ff8ae4b1a7919510fa5290886b1264d6b95c3e
parent7e0b9ba7fc0bc5161d351c7129a5a23650ea7904
rx: Don't call gettimeofday for every packet ack

Every time we receive an ACK packet, we call gettimeofday() for
every entry in the transmit queue that's permanently ack'd by that
packet. Instead, just make a note of the time when we start
processing the packet queue, and use it for every packet in the
queue.

This shaves around 5% off rxperf's runtime with a window size of 128.

Change-Id: I65c705c575c4a470b49390e7efca33c279a3133c
Reviewed-on: http://gerrit.openafs.org/2956
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
src/rx/rx.c
src/rx/rx_prototypes.h