]> git.michaelhowe.org Git - packages/o/openafs.git/commit
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)
committerDerrick Brashear <shadow@dementia.org>
Tue, 26 Oct 2010 00:49:34 +0000 (17:49 -0700)
commitfb8a2049e355dc9a4cd6e7264a2d18d61447e2af
treebeff4ca097391e7d548a6bb6ee6c3546f6291ba8
parentb740896e826b92b2678d1a21ec65f7911a384ce4
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.

Reviewed-on: http://gerrit.openafs.org/2957
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 09aec1539dbe4e4c72ec7acadf2d25e6f93c5982)
Change-Id: I589fa248a124a15248e23b6154e193e4d136fde8
Reviewed-on: http://gerrit.openafs.org/3102
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/rx/rx.c
src/rx/rx.h