rx: Reverse the consumption order of idle queue
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 14 May 2011 07:55:50 +0000 (08:55 +0100)
committerJeffrey Altman <jaltman@openafs.org>
Tue, 21 Jun 2011 03:15:03 +0000 (20:15 -0700)
commit5614305853f0f87a2418a6fb7ca472a8ef966084
treee447d792d7da6c62786ec593eb70af230d223f7c
parentd7d727b87b44d77ca7b108e6d21d9209b5d84c90
rx: Reverse the consumption order of idle queue

Currently, the rx server thread idle queue is used in an LRU manner.
This means that we round robin requests between all of the threads
configured on a given system, which means that we end up thrashing
CPU caches on machines whose workload doesn't require that all of
the configured threads be used.

Change this so that we always use the most recently idle thread. This
isn't as "fair" to all of our waiting threads, but should mean that we
scale better on SMP machines, as a thread that is recently idle is
likely to have been recently scheduled.

Performance numbers to follow ...

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