Page MenuHomeFreeBSD

D27217.id79552.diff
No OneTemporary

D27217.id79552.diff

Index: sys/conf/NOTES
===================================================================
--- sys/conf/NOTES
+++ sys/conf/NOTES
@@ -2842,3 +2842,7 @@
# Kernel support for stats(3).
options STATS
+
+# Try to reduce memory usage. It may come as a tradeoff against performance
+# of multicore systems.
+#options COMPACT
Index: sys/conf/options
===================================================================
--- sys/conf/options
+++ sys/conf/options
@@ -1014,3 +1014,6 @@
# gcov support
GCOV opt_global.h
LINDEBUGFS
+
+# Try to reduce memory usage
+COMPACT
Index: sys/sys/cdefs.h
===================================================================
--- sys/sys/cdefs.h
+++ sys/sys/cdefs.h
@@ -241,6 +241,12 @@
#define __alignof(x) __offsetof(struct { char __a; x __b; }, __b)
#endif
+#ifndef COMPACT
+#define __aligned_if_not_compact(x) __aligned(x)
+#else
+#define __aligned_if_not_compact(x)
+#endif
+
/*
* Keywords added in C11.
*/
Index: sys/sys/systm.h
===================================================================
--- sys/sys/systm.h
+++ sys/sys/systm.h
@@ -169,7 +169,7 @@
*/
#define __read_mostly __section(".data.read_mostly")
#define __read_frequently __section(".data.read_frequently")
-#define __exclusive_cache_line __aligned(CACHE_LINE_SIZE) \
+#define __exclusive_cache_line __aligned_if_not_compact(CACHE_LINE_SIZE) \
__section(".data.exclusive_cache_line")
#ifdef _KERNEL
#include <sys/param.h> /* MAXCPU */

File Metadata

Mime Type
text/plain
Expires
Tue, Sep 1, 2:06 PM (10 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37825892
Default Alt Text
D27217.id79552.diff (1 KB)

Event Timeline