summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2017-07-22 16:58:47 +0000
committerLuiz Souza <luiz@netgate.com>2018-02-21 15:16:13 -0300
commit7e17854953e8d13935cde45634bfc58914e4c118 (patch)
tree95ee5c1594b239bbb270a45b95eefc39e158937f
parentea9d316a874f8d6102a85ebf415aba8f0a28e872 (diff)
downloadFreeBSD-src-7e17854953e8d13935cde45634bfc58914e4c118.zip
FreeBSD-src-7e17854953e8d13935cde45634bfc58914e4c118.tar.gz
MFC r320319
Increase the pageout cluster size to 32 pages. Decouple the pageout cluster size from the size of the hash table entry used by the swap pager for mapping (object, pindex) to a block on the swap device(s), and keep the size of a hash table entry at its current size. Eliminate a pointless macro. (cherry picked from commit 90fed17dafd94f9a34e74086f35e7e8a540e00a7)
-rw-r--r--sys/vm/swap_pager.c4
-rw-r--r--sys/vm/vm_pageout.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index 0cadfb5..7e66549 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -119,7 +119,7 @@ __FBSDID("$FreeBSD$");
* The 64-page limit is due to the radix code (kern/subr_blist.c).
*/
#ifndef MAX_PAGEOUT_CLUSTER
-#define MAX_PAGEOUT_CLUSTER 16
+#define MAX_PAGEOUT_CLUSTER 32
#endif
#if !defined(SWB_NPAGES)
@@ -133,7 +133,7 @@ __FBSDID("$FreeBSD$");
* Unused disk addresses within a swap area are allocated and managed
* using a blist.
*/
-#define SWAP_META_PAGES (SWB_NPAGES * 2)
+#define SWAP_META_PAGES 32
#define SWAP_META_MASK (SWAP_META_PAGES - 1)
struct swblock {
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index a8a19f3..199f2d9 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -250,8 +250,7 @@ static u_int vm_background_launder_max = 20 * 1024;
SYSCTL_UINT(_vm, OID_AUTO, background_launder_max, CTLFLAG_RW,
&vm_background_launder_max, 0, "background laundering cap, in kilobytes");
-#define VM_PAGEOUT_PAGE_COUNT 16
-int vm_pageout_page_count = VM_PAGEOUT_PAGE_COUNT;
+int vm_pageout_page_count = 32;
int vm_page_max_wired; /* XXX max # of wired pages system-wide */
SYSCTL_INT(_vm, OID_AUTO, max_wired,
OpenPOWER on IntegriCloud