Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142761994
D53688.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
D53688.diff
View Options
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -2669,21 +2669,23 @@
}
/*
- * Check that the total amount of swap currently configured does not
- * exceed half the theoretical maximum. If it does, print a warning
- * message.
+ * Check that the total amount of swap does not exceed the maximum or
+ * recommended values, and print a warning if it does. The recommended
+ * value is half the maximum value, to account for fragmentation.
*/
static void
swapon_check_swzone(void)
{
-
- /* recommend using no more than half that amount */
- if (swap_total > swap_maxpages / 2) {
+ if (swap_total > swap_maxpages) {
+ printf("warning: total configured swap (%lu pages) "
+ "exceeds maximum supported amount (%lu pages).\n"
+ "warning: increase kern.maxswzone "
+ "or reduce amount of swap.\n",
+ swap_total, swap_maxpages);
+ } else if (swap_total > swap_maxpages / 2) {
printf("warning: total configured swap (%lu pages) "
- "exceeds maximum recommended amount (%lu pages).\n",
+ "exceeds recommended amount (%lu pages).\n",
swap_total, swap_maxpages / 2);
- printf("warning: increase kern.maxswzone "
- "or reduce amount of swap.\n");
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 24, 7:07 AM (7 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25221868
Default Alt Text
D53688.diff (1 KB)
Attached To
Mode
D53688: swap_pager: Improve swzone warning
Attached
Detach File
Event Timeline
Log In to Comment