mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
b9f06ab347
With locking.tdb now based on g_lock.c code, we change locking.tdb a lot more often. I have a customer case where LDX tortures smbd very hard with 800+ concurrent connections, which now completely falls over where 4.12 still worked fine. Some debugging showed a thundering herd on fcntl locking.tdb index 48 (TDB_SEQNUM_OFS). We still use fcntl for the seqnum, back when we converted the chainlocks to mutexes we did not consider it to be a problem. Now it is, but all we need to do with the SEQNUM is to increment it, so an __atomic_add_fetch() of one is sufficient. I've taken a look at the C11 standard atomics, but I could not figure out how to use them properly, to me they seem more general to be initialized first etc. All we need is a X86 "lock incl 48(%rax)" to be emitted, and the gcc __atomic_add_fetch seems to do this. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> |
||
---|---|---|
.. | ||
check.c | ||
dump.c | ||
error.c | ||
freelist.c | ||
freelistcheck.c | ||
hash.c | ||
io.c | ||
lock.c | ||
mutex.c | ||
open.c | ||
rescue.c | ||
summary.c | ||
tdb_private.h | ||
tdb.c | ||
transaction.c | ||
traverse.c |