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>
Wed, 31 Mar 2010 15:54:31 +0000 (17:54 +0200)
commit9673c93933624ae6e02e83dae3c19351edfd301a
tree4cb061dc1b93ffb66fe869455004260bade32dfe
parentb2677d82dc5c6bc76b0343d90ec75972b5b2a8bf
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)
source3/lib/g_lock.c