rx: Don't malloc the xmit list
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 10 Oct 2010 12:04:41 +0000 (08:04 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Thu, 14 Oct 2010 03:02:05 +0000 (20:02 -0700)
commit09aec1539dbe4e4c72ec7acadf2d25e6f93c5982
treeb16f4e09df3adcfa6b0e7fa1face89368dd623c2
parent7d6080a841ff8c91052fa708d5be3b582f8a971d
rx: Don't malloc the xmit list

Building the transmit list happens in a time critical section of
code. Using malloc to allocate the list which holds the packets to
be transmitted slows down this critical section. Instead, just
allocate the space as part of the call structure.

Locking of xmitList is somewhat tricksy, as the call->lock is
dropped over calls to sendmsg(). However, the xmitList is protected
by the TQ_BUSY call flag, which prevents multiple threads from
usign the transmit queue, and hence the xmitList, simultaneously.

Change-Id: Iff64979fa1caeed2ba57d915fecb7ce823f345cf
Reviewed-on: http://gerrit.openafs.org/2957
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
src/rx/rx.c
src/rx/rx.h