summaryrefslogtreecommitdiffstats
path: root/auth
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2009-05-19 12:42:22 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-05-20 11:44:49 -0700
commit693e4f912b618d35b85fe6521d87fb7f683421d0 (patch)
tree329e46f462e04ff8cbba9304b9816fe79d8c5a49 /auth
parent62a920642a54eac6e4b24a3590f17d628202a210 (diff)
io-threads: Change mutexes/condvars to spinlocks/semaphores
It seems that use of mutexes is resulting in pretty high thread sleep and wake-up cost. What is worse, if a worker thread has acquired a lock, there is a possibility of the main glusterfs thread being put to sleep. We change the use of mutexes into spinlock. At the same time, we cannot anymore use condvars for notification since the condvar interface depends on mutexes itself. Semaphores come to out rescue. Luckily, even the pthread semaphores have a timedwait interface to allow our idle worker threads to make an exit decision. Further, it is possible that spinlocks are not available on all systems so all this is curtained behind #defines so we can fall back to mutexes and condvars implementation. Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'auth')
0 files changed, 0 insertions, 0 deletions