Patch to enable spinlocks (option)
|Reported by:||arnecls||Owned by:||moo|
This patch opens up the possibility to compile xcache so that a spinlock is used instead of a pthread / fcntl mutex. This does bring a performance benefit in heavy load scenarios and showed to be as stable as the "heavy weight" locks in production.
The spinlock has been compiled/tested on Intel CPUs with MacOSX (dev) and FreeBSD 9 (production).
Windows support has been added, too but has not been tested, yet (it compiles).
We would like to see this integrated into xcache, but it would also be nice to have another opinion on the code (maybe there are pitfalls which we didn't see or didn't encounter, yet).