Windows: Stop the thundering herd
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 20 Jan 2012 19:43:06 +0000 (14:43 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 27 Jan 2012 00:11:41 +0000 (16:11 -0800)
commitde4d12dd5366bfddb6fde5bb050ce8fbaeb95f1a
tree0f4e65cb6678de520835bdf43437e48012b0d484
parent1161d5fc3cde5e15cb2d13f01ff225710fc04766
Windows: Stop the thundering herd

The afs redirector used notification events to wake up worker
threads when a task was added to a work queue.  Notification
events when signalled wake up all threads instead of just one.

Instead, use synchronization events to wake up a single thread at
a time and restructure the code to permit workers to wake up
additional workers if there is additional work to be performed
or during library shutdown.

Thanks to Peter Scott for his assistance.

Change-Id: I0fb9d8578035f606f03170622fc9c50a1dbfee3a
Reviewed-on: http://gerrit.openafs.org/6595
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsrdr/kernel/fs/AFSCommSupport.cpp
src/WINNT/afsrdr/kernel/fs/AFSGeneric.cpp
src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp