s3: Optimize g_lock_lock for a heavily contended case
authorVolker Lendecke <vl@samba.org>
Mon, 15 Feb 2010 15:57:16 +0000 (16:57 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 1 Apr 2010 07:39:17 +0000 (09:39 +0200)
commit1c0797d25d0a2454f74963d0c7a973d84ddf793e
tree854ce24ef1bf2b5478665ac7994727e8f1c70d64
parentcca616a10771d9eee4b1ff4de14a49bdfaacf867
s3: Optimize g_lock_lock for a heavily contended case

Only check the existence of the lock owner in g_lock_parse, check the rest of
the records only when we got the lock successfully. This reduces the load on
process_exists which can involve a network roundtrip in the clustered case.
(cherry picked from commit 07978bd175395e0dc770f68fff5b8bd8b0fdeb51)
(cherry picked from commit 9673c93933624ae6e02e83dae3c19351edfd301a)
source3/lib/g_lock.c