svn commit: r363444 - head/sys/vm
Mateusz Guzik
mjg at FreeBSD.org
Thu Jul 23 08:42:16 UTC 2020
Author: mjg
Date: Thu Jul 23 08:42:16 2020
New Revision: 363444
URL: https://svnweb.freebsd.org/changeset/base/363444
Log:
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
Modified:
head/sys/vm/swap_pager.c
Modified: head/sys/vm/swap_pager.c
==============================================================================
--- head/sys/vm/swap_pager.c Thu Jul 23 03:25:31 2020 (r363443)
+++ head/sys/vm/swap_pager.c Thu Jul 23 08:42:16 2020 (r363444)
@@ -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);
More information about the svn-src-head
mailing list