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 15:39:49 +0000 (16:39 +0100)
commite577980623ea64a852bac569bf50fb9c92d98b7b
tree044b9c1223efbe89219c00252c56a0d619697c50
parent0357851c0c8e115e92c89956b28c0468182e93d1
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