]> git.michaelhowe.org Git - packages/o/openafs.git/commit
vol: Add VInit cond var and remove busywaits
authorAndrew Deason <adeason@sinenomine.net>
Thu, 2 Sep 2010 16:25:27 +0000 (11:25 -0500)
committerDerrick Brashear <shadow@dementia.org>
Tue, 8 Feb 2011 14:56:51 +0000 (06:56 -0800)
commitd69b87724790ceb2db25b580cebfc4f18f99dbf9
tree3cc306870fb321d2679855e2d13b11e0e86cf074
parent123c79c2b9a7b1b761df2b67900fe64adb54e091
vol: Add VInit cond var and remove busywaits

In DAFS, FSYNC_sync was waiting for VInit to reach at least 2 by
looping around pthread_yield(). For a server with a large number of
volumes, it can take a while for volumes to preattach, and so we are
effectively busy-waiting for preattach to finish. This can slow
fileserver startup and peg the cpu.

So instead, add a condition variable for when VInit changes, and wait
on that. Also modify other checkers of VInit to use the cond var.

(cherry picked from commit 31bb2e5eb5feb9c8e84d17b49fe70268127cdd43)
Reviewed-on: http://gerrit.openafs.org/2648
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Change-Id: I773ab01095bb0c101a34146ef9bf201946ebcf8b
Reviewed-on: http://gerrit.openafs.org/3887
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/vol/fssync-server.c
src/vol/volume.c
src/vol/volume.h