s3:dbwrap_watch: call dbwrap_watched_trigger_wakeup() outside of the low level record...
authorStefan Metzmacher <metze@samba.org>
Thu, 30 Jun 2022 10:39:18 +0000 (10:39 +0000)
committerRalph Boehme <slow@samba.org>
Tue, 26 Jul 2022 14:32:35 +0000 (14:32 +0000)
commitd5c7e2e27385a4730ff8674650700bd25b77f975
treeb7e1f96d5aec7c9bf3592e24d58f232028be6dd2
parent9d9991166322477781f20372ffd7c19d1632276c
s3:dbwrap_watch: call dbwrap_watched_trigger_wakeup() outside of the low level record lock

This gives a nice speed up, as it's unlikely for the waiters to hit
contention.

The following test with 256 commections all looping with open/close
on the same inode (share root) is improved drastically:

  smbtorture //127.0.0.1/m -Uroot%test smb2.create.bench-path-contention-shared \
     --option='torture:bench_path=' \
     --option="torture:timelimit=60" \
     --option="torture:nprocs=256"

From some like this:

   open[num/s=8800,avslat=0.021445,minlat=0.000095,maxlat=0.179786]
   close[num/s=8800,avslat=0.021658,minlat=0.000044,maxlat=0.179819]

to:

   open[num/s=10223,avslat=0.017922,minlat=0.000083,maxlat=0.106759]
   close[num/s=10223,avslat=0.017694,minlat=0.000040,maxlat=0.107345]

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Jul 26 14:32:35 UTC 2022 on sn-devel-184
source3/lib/dbwrap/dbwrap_watch.c