Reduce sinval synchronization overhead.
authorRobert Haas <rhaas@postgresql.org>
Fri, 29 Jul 2011 20:46:13 +0000 (16:46 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 1 Jun 2012 12:29:52 +0000 (08:29 -0400)
commit9d5c52d044e74eb47250fcc022c77c4cbcc9cc2d
treed94ce4920c8f6551a14ea482acac6fab7ff322e8
parent12917f92364cd9ce41bee400c2875948851c8ca0
Reduce sinval synchronization overhead.

Testing shows that the overhead of acquiring and releasing
SInvalReadLock and msgNumLock on high-core count boxes can waste a lot
of CPU time and hurt performance.  This patch adds a per-backend flag
that allows us to skip all that locking in most cases.  Further
testing shows that this improves performance even when sinval traffic
is very high.

Patch by me.  Review and testing by Noah Misch.
src/backend/storage/ipc/sinvaladt.c