aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execParallel.c
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2018-07-25 10:58:54 +1200
committerThomas Munro <tmunro@postgresql.org>2018-07-25 11:00:53 +1200
commit46201d603f9c79d99e56ce62fb71aae31a99303d (patch)
treeb97fa3489abbe8709192f5af46f151c74ad19fe2 /src/backend/executor/execParallel.c
parent360cbf1a82894db1e948e152327e84ffa650e99a (diff)
downloadpostgresql-46201d603f9c79d99e56ce62fb71aae31a99303d.tar.gz
postgresql-46201d603f9c79d99e56ce62fb71aae31a99303d.zip
Pad semaphores to avoid false sharing.
In a USE_UNNAMED_SEMAPHORES build, the default on Linux and FreeBSD since commit ecb0d20a, we have an array of sem_t objects. This turned out to reduce performance compared to the previous default USE_SYSV_SEMAPHORES on an 8 socket system. Testing showed that the lost performance could be regained by padding the array elements so that they have their own cache lines. This matches what we do for similar hot arrays (see LWLockPadded, WALInsertLockPadded). Back-patch to 10, where unnamed semaphores were adopted as the default semaphore interface on those operating systems. Author: Thomas Munro Reviewed-by: Andres Freund Reported-by: Mithun Cy Tested-by: Mithun Cy, Tom Lane, Thomas Munro Discussion: https://postgr.es/m/CAD__OugYDM3O%2BdyZnnZSbJprSfsGFJcQ1R%3De59T3hcLmDug4_w%40mail.gmail.com
Diffstat (limited to 'src/backend/executor/execParallel.c')
0 files changed, 0 insertions, 0 deletions