Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Mar 2024 04:40:43 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 69c4a0ef86a2 - stable/14 - arm64: Add a VM_FREELIST_DMA32 freelist
Message-ID:  <202403090440.4294ehRO030753@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=69c4a0ef86a22b384d887d5dae76cc13af43b5eb

commit 69c4a0ef86a22b384d887d5dae76cc13af43b5eb
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-01-25 21:33:46 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-03-09 04:26:57 +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
    
    (cherry picked from commit 48d5dab7bace6bae938672784ca3aa8733d72eb9)
---
 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 29fbf6221980..0176045f0cae 100644
--- a/sys/arm64/include/vmparam.h
+++ b/sys/arm64/include/vmparam.h
@@ -85,11 +85,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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202403090440.4294ehRO030753>