Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F169143823
D27217.id79552.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
D27217.id79552.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D27217: Add options COMPACT to produce smaller kernel
Attached
Detach File
Event Timeline
Log In to Comment