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)
committerVolker Lendecke <vl@samba.org>
Tue, 16 Feb 2010 12:21:10 +0000 (13:21 +0100)
commit07978bd175395e0dc770f68fff5b8bd8b0fdeb51
tree82eb86cf2e0c3bc2ff70815bd9262df291146caf
parentf3bdb163f461175c50b4930fa3464beaee30f4a8
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.
source3/lib/g_lock.c