Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147256917
D18381.id51473.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
D18381.id51473.diff
View Options
Index: head/sys/vm/swap_pager.c
===================================================================
--- head/sys/vm/swap_pager.c
+++ head/sys/vm/swap_pager.c
@@ -547,12 +547,12 @@
mtx_unlock(&pbuf_mtx);
/*
- * Initialize our zone, guessing on the number we need based
- * on the number of pages in the system.
+ * Initialize our zone, taking the user's requested size or
+ * estimating the number we need based on the number of pages
+ * in the system.
*/
- n = vm_cnt.v_page_count / 2;
- if (maxswzone && n > maxswzone / sizeof(struct swblk))
- n = maxswzone / sizeof(struct swblk);
+ n = maxswzone != 0 ? maxswzone / sizeof(struct swblk) :
+ vm_cnt.v_page_count / 2;
swpctrie_zone = uma_zcreate("swpctrie", pctrie_node_size(), NULL, NULL,
pctrie_zone_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM);
if (swpctrie_zone == NULL)
@@ -580,7 +580,7 @@
n = uma_zone_get_max(swblk_zone);
if (n < n2)
- printf("Swap blk zone entries reduced from %lu to %lu.\n",
+ printf("Swap blk zone entries changed from %lu to %lu.\n",
n2, n);
swap_maxpages = n * SWAP_META_PAGES;
swzone = n * sizeof(struct swblk);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 10, 12:07 PM (6 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29464848
Default Alt Text
D18381.id51473.diff (1 KB)
Attached To
Mode
D18381: Allow to create swap zone larger than v_page_count / 2.
Attached
Detach File
Event Timeline
Log In to Comment