From nobody Fri Jun 14 01:21:15 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 4W0hLh10lnz5N2qT; Fri, 14 Jun 2024 01:21:16 +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 4W0hLh0BK0z4VBQ; Fri, 14 Jun 2024 01:21:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328076; 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=6plyWhQabunl3dW5/Xq+rFUKNIU/dM9HtCR7DNbrMb4=; b=GDcRf/aEDx12s/CAr8aRtDwIHy0Z0/oTM1pssfSmIIv6VAVPlKX5fw4ng8Z2t4s9ipEj9t qjghWyw8esiaTUE4NDFbxkGoIvSo1RrpsOExGukdaux7Ag3N1GWNGPq40KtrHcI7NQ3Tgs InSYMGJ17IJ/lCWl+4fXrqXS/loHyGe+SsdXxUynpxqZ7X5gmp6zULhYxiw4KXWzhU0b2B VIB8FwAwZQ8gIzDvktwxwpTuisOy8A97Y/4iskpT36+tAuzdi9F3cb2/2YeNn7yqIeeMtX dlIf+CRX+b5d7MhluKJZzr9eWln/7SLi3Po7XBnA8ll5189d1C5Dn9p6rdHxBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718328076; a=rsa-sha256; cv=none; b=E83Nqxn3pfyIpZ+q9UvKCH0e1W9fUDSQUF9/E+M2XyRGl/lyxuwmmLq7EN5QdeUx+4647G gY5L+8zjDHkuSnjva5Qp3tEqKGJ3zwkVJBBsKxpoVodZXLvUAkMefrgRMCWGOkzcQ+5t/l XptLDLSL5AD9A8OXTLdTXPFGRLNTPTVXhxcGsEEFXux4vYOpl3N+rQRXQIFaqtmd+oUdg0 U8ZFrZn7oT6fXUkNGEc+5F6Kz8yxcZlcXFtV85+Dz+0VG7zJzerKPLGMGClxuDQxrEyLZ6 BB6hYpNBbcYXX3U3Cu0zYZ21Tml1Xgqh/Kj5tjyfZSjwHsivURGTPDlwzbOf1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718328076; 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=6plyWhQabunl3dW5/Xq+rFUKNIU/dM9HtCR7DNbrMb4=; b=uR+LZr+w1XNtEWNOWBgru8z93yjV0118OqODzOfOnN4IxkgBnc8Ae51LhFGym8DBYDzhSW cAy7QRIJsubRvgWEuPSZzAobsts/Mf/En1ad++agsfMwT3ZIjct7HkkE6ZdYYa0XADsh3g /12DlSaGOpMdeKvXGjovfJdavlQv57mzISKnl32nkvQ1T/iCoSvcD+eqRYosqgiTQ8IlFL 1yEV8ClWXUJm1S5uXBdU8dcEUNuE/YbnccGNoPINOqBD2rzi5tCO/On9CYl1iY80Mfk1a7 zBGrkaT4Qs1wLftoikep91fb+a89i5pwPxeT8ZwPlQ+q5oipawv068BmVdiwkg== 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 4W0hLg6Smpz10ct; Fri, 14 Jun 2024 01:21:15 +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 45E1LFso054664; Fri, 14 Jun 2024 01:21:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45E1LFXI054661; Fri, 14 Jun 2024 01:21:15 GMT (envelope-from git) Date: Fri, 14 Jun 2024 01:21:15 GMT Message-Id: <202406140121.45E1LFXI054661@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: 69ccea1c89da - main - vm_page: Let vm_page_init_page() take a pool parameter 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 69ccea1c89da82cbb772ac4cca62c1067346fe95 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=69ccea1c89da82cbb772ac4cca62c1067346fe95 commit 69ccea1c89da82cbb772ac4cca62c1067346fe95 Author: Mark Johnston AuthorDate: 2024-06-14 00:11:03 +0000 Commit: Mark Johnston CommitDate: 2024-06-14 01:18:59 +0000 vm_page: Let vm_page_init_page() take a pool parameter This is useful for a subsequent patch which implements lazy initialization of vm_page structures using a dedicate vm_phys free page pool. No functional change intended. Reviewed by: alc, kib, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D40399 --- sys/amd64/amd64/efirt_machdep.c | 3 ++- sys/vm/vm_page.c | 10 +++++----- sys/vm/vm_page.h | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/sys/amd64/amd64/efirt_machdep.c b/sys/amd64/amd64/efirt_machdep.c index 5d0106e2aa88..2c00a16b1499 100644 --- a/sys/amd64/amd64/efirt_machdep.c +++ b/sys/amd64/amd64/efirt_machdep.c @@ -245,7 +245,8 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz) m = PHYS_TO_VM_PAGE(va); if (m != NULL && VM_PAGE_TO_PHYS(m) == 0) { - vm_page_init_page(m, va, -1); + vm_page_init_page(m, va, -1, + VM_FREEPOOL_DEFAULT); m->order = VM_NFREEORDER + 1; /* invalid */ m->pool = VM_NFREEPOOL + 1; /* invalid */ pmap_page_set_memattr_noflush(m, mode); diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 4b97637668b4..3077b023754a 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -497,9 +497,8 @@ vm_page_domain_init(int domain) * lists. */ void -vm_page_init_page(vm_page_t m, vm_paddr_t pa, int segind) +vm_page_init_page(vm_page_t m, vm_paddr_t pa, int segind, int pool) { - m->object = NULL; m->ref_count = 0; m->busy_lock = VPB_FREED; @@ -509,7 +508,7 @@ vm_page_init_page(vm_page_t m, vm_paddr_t pa, int segind) m->psind = 0; m->segind = segind; m->order = VM_NFREEORDER; - m->pool = VM_FREEPOOL_DEFAULT; + m->pool = pool; m->valid = m->dirty = 0; pmap_page_init(m); } @@ -756,7 +755,8 @@ vm_page_startup(vm_offset_t vaddr) #if defined(__i386__) && defined(VM_PHYSSEG_DENSE) for (ii = 0; ii < vm_page_array_size; ii++) { m = &vm_page_array[ii]; - vm_page_init_page(m, (first_page + ii) << PAGE_SHIFT, 0); + vm_page_init_page(m, (first_page + ii) << PAGE_SHIFT, 0, + VM_FREEPOOL_DEFAULT); m->flags = PG_FICTITIOUS; } #endif @@ -765,7 +765,7 @@ vm_page_startup(vm_offset_t vaddr) seg = &vm_phys_segs[segind]; for (m = seg->first_page, pa = seg->start; pa < seg->end; m++, pa += PAGE_SIZE) - vm_page_init_page(m, pa, segind); + vm_page_init_page(m, pa, segind, VM_FREEPOOL_DEFAULT); /* * Add the segment's pages that are covered by one of diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 221f58b8fb04..5422f8df89a0 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -645,7 +645,7 @@ void vm_page_free_invalid(vm_page_t); vm_page_t vm_page_getfake(vm_paddr_t paddr, vm_memattr_t memattr); void vm_page_initfake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr); void vm_page_init_marker(vm_page_t marker, int queue, uint16_t aflags); -void vm_page_init_page(vm_page_t m, vm_paddr_t pa, int segind); +void vm_page_init_page(vm_page_t m, vm_paddr_t pa, int segind, int pool); int vm_page_insert (vm_page_t, vm_object_t, vm_pindex_t); void vm_page_invalid(vm_page_t m); void vm_page_launder(vm_page_t m);