From nobody Thu Jan 25 21:36:48 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TLZ0K15ZYz585GR; Thu, 25 Jan 2024 21:36:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TLZ0K0WPGz4YMp; Thu, 25 Jan 2024 21:36:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706218609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zQz/YqqEzpTERjyc+1lzjX1LM19ZmTluaFIZJTxl/QI=; b=QfA6keiYqWW+5BJvPs1tGTevBZUK6a76XCZvs+xJhTr77MrHwL6uZwJOdJSaa0Di11DP44 1fC3TvWqaMJl50Kqnmo571fCmLUjIX6ytiVKFYIx5oTNukaTVL7t3yEhyqykux8q0Yln23 teLbrGypUItgRUuZlDA2/OhOaEvWgLkrZhdHudlXS0oIl8nHq3bMsyRULOZNpoYUpnvNpU TYe+mVH+LgpF/bd8VtVyVH8800EP6cHeucZQt0Q3JFagGKrI2hZ4T/p+Owa1N91Z2lpCkr l/kANm0t7TWB8T3r1Goq1eAgSBWEq8PxKYLsetNMaeHOV3iXzYDqn2HMrXbVlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706218609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zQz/YqqEzpTERjyc+1lzjX1LM19ZmTluaFIZJTxl/QI=; b=EXqsJfVxQoiKu7KUY+RmLPrge1UlqgJzmrIrgUoROTkfFOcCZ/cEtSoq5gKCEnyHzyrDow jCn9jmfDW/QVMJ1ij3NCiu00f1Ip1JWVS1X3TB5iGTP92OV8XrLaARmIGCnwmUmoZH7Xwj g4rapK/pK2wgu1hNfg1w1eWXC4U5HGmeBFjK5wovSjw0QTsE4QRbczkxgVBX4aekThyZW8 KU26L/hPJ4p9WUvzz3zp1bunrZjCl8oG2HReIzSfUuT4afByXkS+IF//fCoRsfQAvVHKAX B6dYIieu/xWPgkUTdMtx0BFRQ+WUgN+YAwKc351Ewn5tEfoWNqLAgJF6k9aYmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706218609; a=rsa-sha256; cv=none; b=BdtZ2lp/ImBjKGxrRL932zTA5pL6/85weg0k1HN8F9X63jRkK1afyfhRCibcexAwZoGSVz U/5+UQVSvfuwNAg/NifZl03zWizrS7+40SicFPDwUWfxv9SXgpaq0KUo/DxEvPF1cI/Km1 hEkn4Qf1d/ayBGb7N9+Bvti9TSzJ2mY8XsNdczbuP7zNxnK5pAj/9Z8TDqDwOEivVZeAfD ivN5CcqpbyI/hl6JAP3S2tCJUfsPht3gCAQw2bT70+PivNMMnvCl3BxAnzxO4dfpdJyoBD 1v+tuCrQHyO2UR69p61vKwFA9Ye/pSpiMKSF93DBTvjsJWP2sZXYcz85NmuxFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TLZ0J6gckzF52; Thu, 25 Jan 2024 21:36:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40PLam1F015391; Thu, 25 Jan 2024 21:36:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40PLamZh015388; Thu, 25 Jan 2024 21:36:48 GMT (envelope-from git) Date: Thu, 25 Jan 2024 21:36:48 GMT Message-Id: <202401252136.40PLamZh015388@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 48d5dab7bace - main - arm64: Add a VM_FREELIST_DMA32 freelist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48d5dab7bace6bae938672784ca3aa8733d72eb9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=48d5dab7bace6bae938672784ca3aa8733d72eb9 commit 48d5dab7bace6bae938672784ca3aa8733d72eb9 Author: Mark Johnston AuthorDate: 2024-01-25 21:33:46 +0000 Commit: Mark Johnston 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