kernel - usched_dfly revamp (6), reimplement shared spinlocks & misc others
* Rename gd_spinlocks_wr to just gd_spinlocks.
* Reimplement shared spinlocks and optimize the shared spinlock path.
Contended exclusive spinlocks are less optimal with this change.
* Use shared spinlocks for all file descriptor accesses. This includes
not only most IO calls like read() and write(), but also callbacks
from kqueue to double-check the validity of a file descriptor.
* Use getnanouptime() instead of nanouptime() in kqueue_sleep() and
kern_kevent(), removing a hardware I/O serialization (to read the HPET)
from the critical path.
* These changes significantly reduce kernel spinlock contention when running
postgres/pgbench benchmarks.
16 files changed: