Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168913875
D12281.id32896.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D12281.id32896.diff
View Options
Index: head/sys/sys/vmmeter.h
===================================================================
--- head/sys/sys/vmmeter.h
+++ head/sys/sys/vmmeter.h
@@ -60,6 +60,12 @@
#if defined(_KERNEL) || defined(_WANT_VMMETER)
#include <sys/counter.h>
+#ifdef _KERNEL
+#define VMMETER_ALIGNED __aligned(CACHE_LINE_SIZE)
+#else
+#define VMMETER_ALIGNED
+#endif
+
/*
* System wide statistics counters.
* Locking:
@@ -126,14 +132,15 @@
u_int v_free_target; /* (c) pages desired free */
u_int v_free_min; /* (c) pages desired free */
u_int v_free_count; /* (f) pages free */
- u_int v_wire_count; /* (a) pages wired down */
- u_int v_active_count; /* (q) pages active */
u_int v_inactive_target; /* (c) pages desired inactive */
- u_int v_inactive_count; /* (q) pages inactive */
- u_int v_laundry_count; /* (q) pages eligible for laundering */
u_int v_pageout_free_min; /* (c) min pages reserved for kernel */
u_int v_interrupt_free_min; /* (c) reserved pages for int code */
u_int v_free_severe; /* (c) severe page depletion point */
+ u_int v_wire_count VMMETER_ALIGNED; /* (a) pages wired down */
+ u_int v_active_count VMMETER_ALIGNED; /* (a) pages active */
+ u_int v_inactive_count VMMETER_ALIGNED; /* (a) pages inactive */
+ u_int v_laundry_count VMMETER_ALIGNED; /* (a) pages eligible for
+ laundering */
};
#endif /* _KERNEL || _WANT_VMMETER */
Index: head/sys/vm/vm_meter.c
===================================================================
--- head/sys/vm/vm_meter.c
+++ head/sys/vm/vm_meter.c
@@ -56,7 +56,7 @@
#include <vm/vm_object.h>
#include <sys/sysctl.h>
-struct vmmeter vm_cnt = {
+struct vmmeter __exclusive_cache_line vm_cnt = {
.v_swtch = EARLY_COUNTER,
.v_trap = EARLY_COUNTER,
.v_syscall = EARLY_COUNTER,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 31, 5:42 PM (15 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37709365
Default Alt Text
D12281.id32896.diff (1 KB)
Attached To
Mode
D12281: Move vmmeter atomic counters into dedicated cache lines
Attached
Detach File
Event Timeline
Log In to Comment