git: 48d5dab7bace - main - arm64: Add a VM_FREELIST_DMA32 freelist
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 25 Jan 2024 21:36:48 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=48d5dab7bace6bae938672784ca3aa8733d72eb9
commit 48d5dab7bace6bae938672784ca3aa8733d72eb9
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-01-25 21:33:46 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-01-25 21:33:46 +0000
arm64: Add a VM_FREELIST_DMA32 freelist
When booting a KMSAN kernel on an Ampere Altra, I've seen some boot time
hangs when the XHCI controller driver attempts to allocate memory for
32-bit DMA. The system boots fine with a GENERIC kernel; I believe that
the additional memory requirements of KMSAN push it over the edge. The
system has a bit less than 2GB of RAM below the 4GB boundary.
Allocate a new freelist to segregate memory below 4GB, as we do on
amd64, so that such memory allocation failures are less likely to occur.
Reviewed by: alc
MFC after: 1 month
Sponsored by: Klara, Inc.
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D43503
---
sys/arm64/include/vmparam.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h
index fe5d66c2d73f..d577b9315471 100644
--- a/sys/arm64/include/vmparam.h
+++ b/sys/arm64/include/vmparam.h
@@ -83,11 +83,13 @@
#define VM_FREEPOOL_DIRECT 1
/*
- * Create one free page lists: VM_FREELIST_DEFAULT is for all physical
- * pages.
+ * Create two free page lists: VM_FREELIST_DMA32 is for physical pages that have
+ * physical addresses below 4G, and VM_FREELIST_DEFAULT is for all other
+ * physical pages.
*/
-#define VM_NFREELIST 1
+#define VM_NFREELIST 2
#define VM_FREELIST_DEFAULT 0
+#define VM_FREELIST_DMA32 1
/*
* When PAGE_SIZE is 4KB, an allocation size of 16MB is supported in order