18 Commits

Author SHA1 Message Date
John Sully
495dff1e8c Implement rehash during spinlock
Former-commit-id: f68a26381a35b27948046d46c2c7bcfbdc21143d
2021-02-07 19:11:05 -05:00
John Sully
abd543c8e9 Issue: #260 Don't use C++ static_assert in C files
Former-commit-id: f19b9c155ef5b957f7cd9a3017c54aab742ffb2f
2020-11-30 23:01:20 +00:00
John Sully
d344d9b0b9 Auto tune lock for high CPU tension scenarios
Former-commit-id: 8edbae2e04538f82a146a6c2b459a6dfcacf99b2
2020-05-30 18:22:27 -04:00
John Sully
9bc3029a02 Fix some clang warnings
Former-commit-id: 3785b1efd49002e629c1d821c57e971f8f09a2d2
2020-04-16 20:12:05 -04:00
John Sully
d46d4cd9ef 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: 4c8603815cf525c75dcc360fddeab9ca6fe70ae6
2019-11-17 16:06:49 -05:00
John Sully
b1190c24a8 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: 600fc241cfe79b9b32ac6010c6ea0c66747f0f15
2019-10-22 21:34:51 -04:00
John Sully
8cd37fae2c Fix deadlock with client and ae locks
Former-commit-id: 8630339e43c1de1cd723bdfdca8ab5924e2cb8b0
2019-07-12 20:46:50 -04:00
John Sully
d65ce6fbbc Fix issues with relaxed memory model architectures
Former-commit-id: e37bc4ad40e852b67ee14e5aa87fd2f398f00eed
2019-06-17 23:00:12 -04:00
John Sully
dd7cbbe730 Fallback to a futex if we spin for a long time
Former-commit-id: ec57b4b0248bba671e388a2257b1bd65ed8d0f44
2019-06-17 23:00:12 -04:00
John Sully
fbe1a6c52a Add debugging stats to the INFO command
Former-commit-id: ac80a5c6a6676f45ac7d460a9cfb02fef8b48d78
2019-03-19 22:04:33 -04:00
John Sully
2788cf57b0 Implement try_lock 2019-02-22 01:23:31 -05:00
John Sully
d48cf2494d 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
0914b52ffa Thread safety fixes 2019-02-18 22:25:35 -05:00
John Sully
c0eb2e5193 Fix recursive fastlock... 2019-02-16 14:25:14 -05:00
John Sully
8b7e441997 Make the lock recursive, this is because processEventsWhileBlocked may cause us to lock multiple times 2019-02-15 14:11:05 -05:00
John Sully
6059bc7e67 Initial work of multithreaded key-db. Note: Fails tests 2019-02-11 03:36:18 -05:00
John Sully
eefa3e9168 Fastlock fixes 2019-02-10 22:00:19 -05:00
John Sully
bd46c2041e move ae to C++ 2019-02-10 20:24:11 -05:00