John Sully
11cd2d6776
Merge branch 'unstable' into keydbpro
...
Former-commit-id: 14c24ce161ddcbddb701a20062659261397cb0e4
2021-05-29 06:49:05 +00:00
John Sully
292bf82483
Mac build break fixes
...
Former-commit-id: 083b54472c
2021-05-28 22:40:03 -04:00
John Sully
6b4f686f5f
Merge branch 'unstable' into keydbpro
...
Former-commit-id: 205d8f18d2bb8df5253bab40578b006b7aa73fd5
2021-05-28 23:32:46 +00:00
John Sully
5267928381
Merge tag '6.2.2' into unstable
...
Former-commit-id: 93ebb31b17
2021-05-21 05:54:39 +00:00
John Sully
6b579db919
Fix TSAN errors in tests
...
Former-commit-id: 30207d2ab34f175b94f430f97581191343d23f1e
2021-03-16 02:29:24 +00:00
John Sully
8ce03686ed
Ensure the C lock implementation behaves the same as the ASM
...
Former-commit-id: b5ddc11c46
2021-02-07 19:11:05 -05:00
John Sully
7c700f1987
Ensure rehash completes even when we're in a long running task
...
Former-commit-id: f107746e90
2021-02-07 19:11:05 -05:00
John Sully
bef72e5f6a
Implement rehash during spinlock
...
Former-commit-id: f68a26381a
2021-02-07 19:11:05 -05:00
John Sully
b243fa876f
Merge branch 'unstable' of https://github.com/JohnSully/KeyDB into unstable
...
Former-commit-id: 143f7f634d
2020-09-21 04:42:46 +00:00
Dmitry Dorofeev
823de49e83
Fix to support FreeBSD pthread_getthreadid_np call
...
Former-commit-id: 955faef23a
2020-09-21 00:41:41 -04:00
John Sully
7b0a5d1e40
Fix TSAN errors in fastlock
...
Former-commit-id: 2e159e6ea3
2020-09-21 03:26:50 +00:00
John Sully
8740fb79af
Fix race in futex_sleep
...
Former-commit-id: 73300c5700
2020-05-31 16:03:50 -04:00
John Sully
1ac6e3ecc5
Auto tune lock for high CPU tension scenarios
...
Former-commit-id: 8edbae2e04
2020-05-30 18:22:27 -04:00
John Sully
c15802af8b
Fix issue #170 . Intermittent crash destroying fastlock due to implicit type conversion in assert
...
Former-commit-id: ecbe168b54
2020-05-25 02:13:57 -04:00
John Sully
975ca828d4
Quiet TSAN during exit
...
Former-commit-id: fd710d590a
2020-05-24 12:45:10 -04:00
John Sully
a1d9c2e827
use serverAssert() instead of assert() to get callstacks in fastlock
...
Former-commit-id: 45535e8a63
2020-04-28 22:41:07 -04:00
John Sully
0b9779c33f
Fix some clang warnings
...
Former-commit-id: 3785b1efd4
2020-04-16 20:12:05 -04:00
John Sully
cf9efc8e9f
Deprecate travis and finish setting up github CI
...
Former-commit-id: 90094a2dca
2020-04-15 23:04:04 -04:00
John Sully
4f2f2affed
ASAN races in leak checker
...
Former-commit-id: 9dfa074cd6
2020-04-15 22:24:12 -04:00
John Sully
69806aaa7b
Print stack traces of other threads in the deadlock detector
...
Former-commit-id: 6b0172b9bf
2020-03-19 15:37:49 -04:00
John Sully
ec4eb534d7
Fix compile failure on raspberry pi machines, issue #141
...
Former-commit-id: aaca32a5cd
2020-02-28 23:49:17 -05:00
John Sully
1db49c5897
Fix issue #146
...
Former-commit-id: e5a2d59446
2020-02-28 21:21:05 -05:00
John Sully
c2ef5957ef
Add double unlock detection and improve fastlock_unlock assmebly
...
Former-commit-id: 98aefac09b
2020-02-17 19:54:05 -05:00
John Sully
1790b02984
Fix issue #130 due to fastlock timeout reduction
...
Former-commit-id: dbef17c2e1
2020-01-01 11:52:00 -05:00
John Sully
0860489563
Fix deadlock in spinlock (mfence) also spin for less time before sleeping
...
Former-commit-id: 8a9045c028
2019-11-30 00:51:58 -05:00
John Sully
dd5acf2c0d
Fastlock should yield in ARM
...
Former-commit-id: 6c65a11b8d
2019-11-28 14:26:43 -05:00
John Sully
72bbf16c2f
Fix failure to wakeup from futex sleep due to fastlock_unlock reading the wrong offset in the asm version. Also fix false sharing in spinlock
...
Former-commit-id: 4c8603815c
2019-11-17 16:06:49 -05:00
John Sully
b14b11c87c
Fix build break in TravisCI
...
Former-commit-id: 2da09e0732
2019-10-23 13:31:39 -04:00
John Sully
03769b5c17
Remove race conditions
...
Former-commit-id: 5a8cb77d0d
2019-10-22 23:26:37 -04:00
John Sully
1c1260d71f
Optimize deadlock detection, fix callstack for ASM, and annotate locks
...
Note: This change moves our assembly code to use the GNU Assembler because NASM seems to be incapable of emitting the necessary debug information for callstack unwinding to work.
Former-commit-id: 600fc241cf
2019-10-22 21:34:51 -04:00
John Sully
b84d9671ec
Implement deadlock detection
...
Former-commit-id: fa797408d9
2019-10-22 00:43:32 -04:00
John Sully
7ba2941735
Add support for sanitizers and fix issues they have found
...
Former-commit-id: 58971a430d
2019-07-18 18:39:42 -04:00
John Sully
8f1e7d9d5b
Fix deadlock with client and ae locks
...
Former-commit-id: 8630339e43
2019-07-12 20:46:50 -04:00
John Sully
5aaa95ec11
Fix additional warnings
...
Former-commit-id: 1531cfb7ee
2019-06-27 16:29:36 -04:00
John Sully
15d37f3d65
Fix mac build breaks
...
Former-commit-id: 16a89f21dc
2019-06-27 15:04:09 -04:00
John Sully
fb1b845fe5
Fix issues with relaxed memory model architectures
...
Former-commit-id: e37bc4ad40
2019-06-17 23:00:12 -04:00
John Sully
0cd9bc48fc
Even the next up thread should sleep in the futex
...
Former-commit-id: 8b76b01bfe
2019-06-17 23:00:12 -04:00
John Sully
5573f021c5
Fallback to a futex if we spin for a long time
...
Former-commit-id: ec57b4b024
2019-06-17 23:00:12 -04:00
John Sully
a6724676be
OS X build fixes
...
Former-commit-id: 1dff223c71
2019-03-24 18:06:57 -04:00
John Sully
4def2bad94
comment issue
...
Former-commit-id: 19956b3807
2019-03-21 22:18:48 +00:00
John Sully
4ed44398fd
Polarity of the weak flag was wrong. We want to use the strong variant of atomic_compare_exchange always
...
Former-commit-id: ab9122f2cb
2019-03-21 22:17:04 +00:00
John Sully
be3272ec38
Add debugging stats to the INFO command
...
Former-commit-id: ac80a5c6a6
2019-03-19 22:04:33 -04:00
John Sully
465b8a9ea7
write fastlock_unlock in ASM... because its faster
...
Former-commit-id: bad73faf28
2019-03-02 16:47:27 -05:00
John Sully
7a4227915a
Rewrite our spinlock in assembly, pretty big performance improvement
...
Former-commit-id: 40d7a701fe
2019-02-25 18:21:27 -05:00
John Sully
1761aabab4
Lock use after free
2019-02-22 21:00:14 -05:00
John Sully
b6735ac883
Remove unnecessary mfences
2019-02-22 15:49:22 -05:00
John Sully
d016b967c5
Implement try_lock
2019-02-22 01:23:31 -05:00
John Sully
942510f1a5
Change fastlock implementation from naive spinlock to a ticket lock for better fairness and lower peak latency
2019-02-21 00:16:47 -05:00
John Sully
02e7fe400c
Cleanup lock contention, and ensure clients are written to in an unsafe way when the global lock is released
2019-02-20 23:30:21 -05:00
John Sully
29c1105132
Multithreading works!
2019-02-20 01:20:26 -05:00