summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2024-04-17 13:12:59 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2024-04-17 13:12:59 +0000
commita9a952c6b5ebb70f96297507aadd9b9e42dfc6a8 (patch)
treee026aa6507fb0e61f8fcf75cad35115a42e0baa7 /sys/arch/i386
parenta5e57701c2d21a274c10aae196a7fc44927e079e (diff)
Add per-CPU caches to the pmemrange allocator.
The caches are used primarily to reduce contention on uvm_lock_fpageq() during concurrent page faults. For the moment only uvm_pagealloc() tries to get a page from the current CPU's cache. So on some architectures the caches are also used by the pmap layer. Each cache is composed of two magazines, design is borrowed from jeff bonwick vmem's paper and the implementation is similar to the one of pool_cache from dlg@. However there is no depot layer and magazines are refilled directly by the pmemrange allocator. Tested by robert@, claudio@ and Laurence Tratt. ok kettenis@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/include/cpu.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h
index ef7db2af795..9ad7163dccc 100644
--- a/sys/arch/i386/include/cpu.h
+++ b/sys/arch/i386/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.185 2024/02/25 19:15:50 cheloha Exp $ */
+/* $OpenBSD: cpu.h,v 1.186 2024/04/17 13:12:58 mpi Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
@@ -69,6 +69,7 @@
#include <sys/sched.h>
#include <sys/sensors.h>
#include <sys/srp.h>
+#include <uvm/uvm_percpu.h>
struct intrsource;
@@ -99,6 +100,8 @@ struct cpu_info {
#if defined(MULTIPROCESSOR)
struct srp_hazard ci_srp_hazards[SRP_HAZARD_NUM];
+#define __HAVE_UVM_PERCPU
+ struct uvm_pmr_cache ci_uvm;
#endif
/*