aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2020-07-23 08:42:16 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2020-07-23 08:42:16 +0000
commit126a2470b9b435d1883359013a5362c8791fca2e (patch)
treeb91587024226b55561401e3d0528367822ebdaf4
parent91e04f9e7ab70771497040e53d2ad642a1926311 (diff)
downloadsrc-126a2470b9b435d1883359013a5362c8791fca2e.tar.gz
src-126a2470b9b435d1883359013a5362c8791fca2e.zip
vm: annotate swap_reserved with __exclusive_cache_line
The counter keeps being updated all the time and variables read afterwards share the cacheline. Note this still fundamentally does not scale and needs to be replaced, in the meantime gets a bandaid. brk1_processes -t 52 ops/s: before: 8598298 after: 9098080
Notes
Notes: svn path=/head/; revision=363444
-rw-r--r--sys/vm/swap_pager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index 74f8ed08d2cd..287122dad34d 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -152,7 +152,7 @@ static int nswapdev; /* Number of swap devices */
int swap_pager_avail;
static struct sx swdev_syscall_lock; /* serialize swap(on|off) */
-static u_long swap_reserved;
+static __exclusive_cache_line u_long swap_reserved;
static u_long swap_total;
static int sysctl_page_shift(SYSCTL_HANDLER_ARGS);