summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-07-16 14:41:58 +0000
committerkib <kib@FreeBSD.org>2015-07-16 14:41:58 +0000
commit83cf60b07db68680af923ff4a2d8e21d8a7e059b (patch)
treea9994e2652a9004965044919dc052e1e341a9067 /sys/amd64/include
parent1392531c0fe9b8815ac27613f4a9a26af79223d0 (diff)
downloadFreeBSD-src-83cf60b07db68680af923ff4a2d8e21d8a7e059b.zip
FreeBSD-src-83cf60b07db68680af923ff4a2d8e21d8a7e059b.tar.gz
MFC r276439 (by alc):
Make the creation of the free lists dynamic, i.e., it is based on the available physical memory at boot time. For amd64 systems with 64 GB or more of physical memory, create free lists for managing pages with physical addresses below 4 GB. PR: 185727 Requested by: alc Approved by: re (gjb)
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/vmparam.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h
index 14c5134..91066c6 100644
--- a/sys/amd64/include/vmparam.h
+++ b/sys/amd64/include/vmparam.h
@@ -101,14 +101,22 @@
#define VM_FREEPOOL_DIRECT 1
/*
- * Create two free page lists: VM_FREELIST_DEFAULT is for physical
- * pages that are above the largest physical address that is
- * accessible by ISA DMA and VM_FREELIST_ISADMA is for physical pages
- * that are below that address.
+ * Create up to three free page lists: VM_FREELIST_DMA32 is for physical pages
+ * that have physical addresses below 4G but are not accessible by ISA DMA,
+ * and VM_FREELIST_ISADMA is for physical pages that are accessible by ISA
+ * DMA.
*/
-#define VM_NFREELIST 2
+#define VM_NFREELIST 3
#define VM_FREELIST_DEFAULT 0
-#define VM_FREELIST_ISADMA 1
+#define VM_FREELIST_DMA32 1
+#define VM_FREELIST_ISADMA 2
+
+/*
+ * Create the DMA32 free list only if the number of physical pages above
+ * physical address 4G is at least 16M, which amounts to 64GB of physical
+ * memory.
+ */
+#define VM_DMA32_NPAGES_THRESHOLD 16777216
/*
* An allocation size of 16MB is supported in order to optimize the
OpenPOWER on IntegriCloud