[PATCH] TDB traverse lock changes for massive AD DC perf improvement

Douglas Bagnall douglas.bagnall at catalyst.net.nz
Fri Apr 7 05:28:02 UTC 2017

On 06/04/17 19:47, Stefan Metzmacher via samba-technical wrote:
>>> I think the first step is a standalone test that does this:
>>> process1: F_RDLCK for ofs=0 len=2
>>> process2: F_RDLCK for ofs=0 len=1
>>> process1: upgrade ofs=0 len=2 to F_RWLCK (in blocking mode)
>>> process2: F_RDLCK for ofs=1 len=1
>>> process2: unlock ofs=0 len=2
>>> process1: should continue at that point
>>> Once we have such a test we can run it on several solaris, freebsd,
>>> linux or whatever.
>>> Then we can decide if we want a configure and/or runtime check for
>>> this.
>>> And only avoid the transaction F_RDLCK lock in traverse_read if the
>>> kernel
>>> behaves as expected.
>>> Can you write such a standalone test?
>> I'll give it a shot today.  Can I do it in python?
> No, I think we need this in C.

I had a go at it. Attached.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: fcntl_deadlock.c
Type: text/x-csrc
Size: 2522 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170407/094cf1c4/fcntl_deadlock.c>

More information about the samba-technical mailing list