Get rid of the SpinLockAcquire/SpinLockAcquire_NoHoldoff distinction
Tom Lane <tgl@sss.pgh.pa.us>
Get rid of the SpinLockAcquire/SpinLockAcquire_NoHoldoff distinction in favor of having just one set of macros that don't do HOLD/RESUME_INTERRUPTS (hence, these correspond to the old SpinLockAcquire_NoHoldoff case). Given our coding rules for spinlock use, there is no reason to allow CHECK_FOR_INTERRUPTS to be done while holding a spinlock, and also there is no situation where ImmediateInterruptOK will be true while holding a spinlock. Therefore doing HOLD/RESUME_INTERRUPTS while taking/releasing a spinlock is just a waste of cycles. Qingqing Zhou and Tom Lane.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xlog.c | modified | +15 −15 |
| src/backend/storage/buffer/bufmgr.c | modified | +36 −48 |
| src/backend/storage/ipc/shmem.c | modified | +2 −1 |
| src/backend/storage/lmgr/lwlock.c | modified | +10 −9 |
| src/include/storage/buf_internals.h | modified | +6 −14 |
| src/include/storage/spin.h | modified | +11 −25 |