Page MenuHomeFreeBSD

D53688.diff
No OneTemporary

D53688.diff

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

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)

Event Timeline