RFC: s3/smbd: change locking behavior when "lock spin time = 0"
jra at samba.org
Fri Feb 12 22:28:48 MST 2010
On Fri, Feb 12, 2010 at 05:04:18PM -0800, Steven Danneman wrote:
> Please do :). I had to read ALL of the locking code very carefully to
> come upon this fix.
> I honestly can't say what the name of the application is because I don't
> know but this was a simple case of "performance was good on Samba 3.0,
> performance sucks on Samba 3.4". The reason turned out to be the
> implementation of the correct Windows LockViolationDelay semantics.
> So in 3.0 a client that sent the same contending locking request 20
> times in a row would get NT_STATUS_LOCK_CONFLICT returned in about 1ms
> each, totaling 20ms delay. In 3.4 each of these locks would pause
> server side for 250ms, making the client wait for ~5 seconds before
> So this patch really just gives the ability to revert to the 3.0
> behavior if an admin doesn't mind having the server spammed by locking
Ok, this looks good to me. Pushing. Interesting that the Samba
"lock spin time" is actually the same registry parameter as "LockViolationDelay"
Our docs are wrong though, should be in milliseconds, not microseconds.
I'll fix that too.
Do you want to log an "enhancement" bug so we can get this into 3.5.1
(I think it's too late for 3.5.0) ?
More information about the samba-technical