From nobody Wed Jul 24 19:32:25 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 4WTkgG2Hs4z5QJ3P; Wed, 24 Jul 2024 19:32:26 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WTkgG0WKqz4T0g; Wed, 24 Jul 2024 19:32:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721849546; 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=ewmU2/xR/crj87bzIhTacg24QR98tA0ky9NnuSeVo58=; b=YFVdpPS84lKMycJs4tFcd6DIed9cxOf69skgQc/YorHcEaBrvxr5DQXsWhHcxcJm7BFsFX OViyge4QWLWGX2oQ/cU0u2Z8dGUmt4+ArsLF0CpuCZ6SGfsBqSvN9BLFRNZdQwmqdjwjyJ GKi8VirV2ZnN4BynOPb4IEaDArq7eM3iH3/hjYRA3f/2Ui5jOUoDezLUGQpLRRkvvS6zuX tY36IY3lwBi8rwMIfYxYUs6Bkd0mijZx1aCSoUWDelzhSC7bDuyDsDjIKStLDRlviaDlpH nTmhp4WX1wQ1vRxxVIEh2ed8eAAvv24NYq891CCBdF+CWlqPD56u2Zri+rQprg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721849546; a=rsa-sha256; cv=none; b=MEjpq9m30MJHt7dRInaHvzTmWD0t+nmiJGSfn4tr0S41DlCB/ElCBup2n9npJRBKHKcyDy zeZ5+B13yCd+QQa9cTB5DNi2a5q4z450jQVyRVJiA8ZIDjBt7GcA+bX2kOBrUBdmWHNFmi ggEJkIUh2C9eQ1hLfjI4pFZ06WZA8wt1ZYlGzuNU920Hz3WZug8bc2kV6CWnbhHX2var/P 06vGvnGPtZpKitQRuAxr94ywFQEmxTNmLyRMgHWMhfAgbWDDj3vX5M/+1NR6iheKBc7f+2 AtDN6/bDOBVnGosXo5F2eu51tvqawaYWC5reg+7dMeS1/uRpaFhz4S9I/x8TsA== 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=1721849546; 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=ewmU2/xR/crj87bzIhTacg24QR98tA0ky9NnuSeVo58=; b=U9+uiW4GASC2IDls0OhtAaCofdtWdYz4mOOcq+GU4HdqzW2Iv3IwOWJAlAz/1XTsTUpBua N85ZG2uyI6a9JJ+mSlUSag0BPYCaXjnHMkqArPPD2n5jP1sO3cAKOxrja7ZEgp6KhXJEde eyBwxoRSa4efmZOBLZaQB7lb/lFK4bY1PB4sHRulYshsKFCdqlsAtFqon+n26N4SJeDMSE hHCfUWp1cPk6gC6f6U+js0NJcGokBBtjxQ6eqz2IciBhoFe2zMdnO/WTLeVuvBsqp58SOA IIZn7cZFt228KygUXudn554cXPhdkKNw98+JKNfuTtlxbzVM5ddixC5+5yVJ2A== 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 4WTkgG06k5zP9Y; Wed, 24 Jul 2024 19:32:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46OJWPwi093616; Wed, 24 Jul 2024 19:32:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46OJWPV7093613; Wed, 24 Jul 2024 19:32:25 GMT (envelope-from git) Date: Wed, 24 Jul 2024 19:32:25 GMT Message-Id: <202407241932.46OJWPV7093613@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 096dfa338d73 - main - vm: Retire vm_page_alloc_freelist{,_domain}() 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: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 096dfa338d7391cc957dba9cca44ceb7f78cb891 Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=096dfa338d7391cc957dba9cca44ceb7f78cb891 commit 096dfa338d7391cc957dba9cca44ceb7f78cb891 Author: Alan Cox AuthorDate: 2024-07-23 07:14:31 +0000 Commit: Alan Cox CommitDate: 2024-07-24 19:31:40 +0000 vm: Retire vm_page_alloc_freelist{,_domain}() Once upon a time, I created vm_page_alloc_freelist{,_domain}() to support faster allocation of pages that were mapped by the partial direct map on 32-bit MIPS. At the time, I expected that these functions might find other uses too, but those other uses never materialized. So, these functions have not been used for some time now. Instead, people use the more general vm_page_alloc_contig(). Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D46063 --- ObsoleteFiles.inc | 4 ++++ share/man/man9/Makefile | 2 -- share/man/man9/vm_page_alloc.9 | 26 +-------------------- sys/vm/vm_page.c | 51 +++++------------------------------------- sys/vm/vm_page.h | 2 -- 5 files changed, 11 insertions(+), 74 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index f8f0309d6ccf..02a34a2541eb 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20240721: retire vm_page_alloc_freelist +OLD_FILES+=usr/share/man/man9/vm_page_alloc_freelist.9.gz +OLD_FILES+=usr/share/man/man9/vm_page_alloc_freelist_domain.9.gz + # 20240716: retire mergemaster OLD_FILES+=usr/sbin/mergemaster OLD_FILES+=usr/share/man/man8/mergemaster.8.gz diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 9880b7b2f5e4..f7c21ab541b6 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -2384,8 +2384,6 @@ MLINKS+=vm_page_alloc.9 vm_page_alloc_after.9 \ vm_page_alloc.9 vm_page_alloc_contig_domain.9 \ vm_page_alloc.9 vm_page_alloc_domain.9 \ vm_page_alloc.9 vm_page_alloc_domain_after.9 \ - vm_page_alloc.9 vm_page_alloc_freelist.9 \ - vm_page_alloc.9 vm_page_alloc_freelist_domain.9 \ vm_page_alloc.9 vm_page_alloc_noobj.9 \ vm_page_alloc.9 vm_page_alloc_noobj_contig.9 \ vm_page_alloc.9 vm_page_alloc_noobj_contig_domain.9 \ diff --git a/share/man/man9/vm_page_alloc.9 b/share/man/man9/vm_page_alloc.9 index de225e05d707..7d6cf1692bb1 100644 --- a/share/man/man9/vm_page_alloc.9 +++ b/share/man/man9/vm_page_alloc.9 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd November 11, 2021 +.Dd July 21, 2024 .Dt VM_PAGE_ALLOC 9 .Os .Sh NAME @@ -87,17 +87,6 @@ .Fa "vm_page_t mpred" .Fc .Ft vm_page_t -.Fo vm_page_alloc_freelist -.Fa "int freelist" -.Fa "int req" -.Fc -.Ft vm_page_t -.Fo vm_page_alloc_freelist_domain -.Fa "int domain" -.Fa "int freelist" -.Fa "int req" -.Fc -.Ft vm_page_t .Fo vm_page_alloc_noobj .Fa "int req" .Fc @@ -212,19 +201,6 @@ or will carry the machine-dependent encoding of the memory attribute. Additionally, the direct mapping of the page, if any, will be updated to reflect the requested memory attribute. -.Pp -The -.Fn vm_page_alloc_freelist -and -.Fn vm_page_alloc_freelist_domain -functions behave identically to -.Fn vm_page_alloc_noobj -and -.Fn vm_page_alloc_noobj_domain , -respectively, except that a successful allocation will return a page from the -specified physical memory freelist. -These functions are not intended for use outside of the virtual memory -subsystem and exist only to support the requirements of certain platforms. .Sh REQUEST FLAGS All page allocator functions accept a .Fa req diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index c9ac79330696..64413ba10bfa 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -2406,11 +2406,10 @@ vm_page_alloc_contig_domain(vm_object_t object, vm_pindex_t pindex, int domain, /* * Allocate a physical page that is not intended to be inserted into a VM - * object. If the "freelist" parameter is not equal to VM_NFREELIST, then only - * pages from the specified vm_phys freelist will be returned. + * object. */ -static __always_inline vm_page_t -_vm_page_alloc_noobj_domain(int domain, const int freelist, int req) +vm_page_t +vm_page_alloc_noobj_domain(int domain, int req) { struct vm_domain *vmd; vm_page_t m; @@ -2426,8 +2425,7 @@ _vm_page_alloc_noobj_domain(int domain, const int freelist, int req) flags = (req & VM_ALLOC_NODUMP) != 0 ? PG_NODUMP : 0; vmd = VM_DOMAIN(domain); again: - if (freelist == VM_NFREELIST && - vmd->vmd_pgcache[VM_FREEPOOL_DIRECT].zone != NULL) { + if (vmd->vmd_pgcache[VM_FREEPOOL_DIRECT].zone != NULL) { m = uma_zalloc(vmd->vmd_pgcache[VM_FREEPOOL_DIRECT].zone, M_NOWAIT | M_NOVM); if (m != NULL) { @@ -2438,17 +2436,12 @@ again: if (vm_domain_allocate(vmd, req, 1)) { vm_domain_free_lock(vmd); - if (freelist == VM_NFREELIST) - m = vm_phys_alloc_pages(domain, VM_FREEPOOL_DIRECT, 0); - else - m = vm_phys_alloc_freelist_pages(domain, freelist, - VM_FREEPOOL_DIRECT, 0); + m = vm_phys_alloc_pages(domain, VM_FREEPOOL_DIRECT, 0); vm_domain_free_unlock(vmd); if (m == NULL) { vm_domain_freecnt_inc(vmd, 1); #if VM_NRESERVLEVEL > 0 - if (freelist == VM_NFREELIST && - vm_reserv_reclaim_inactive(domain)) + if (vm_reserv_reclaim_inactive(domain)) goto again; #endif } @@ -2482,32 +2475,6 @@ found: return (m); } -vm_page_t -vm_page_alloc_freelist(int freelist, int req) -{ - struct vm_domainset_iter di; - vm_page_t m; - int domain; - - vm_domainset_iter_page_init(&di, NULL, 0, &domain, &req); - do { - m = vm_page_alloc_freelist_domain(domain, freelist, req); - if (m != NULL) - break; - } while (vm_domainset_iter_page(&di, NULL, &domain) == 0); - - return (m); -} - -vm_page_t -vm_page_alloc_freelist_domain(int domain, int freelist, int req) -{ - KASSERT(freelist >= 0 && freelist < VM_NFREELIST, - ("%s: invalid freelist %d", __func__, freelist)); - - return (_vm_page_alloc_noobj_domain(domain, freelist, req)); -} - vm_page_t vm_page_alloc_noobj(int req) { @@ -2525,12 +2492,6 @@ vm_page_alloc_noobj(int req) return (m); } -vm_page_t -vm_page_alloc_noobj_domain(int domain, int req) -{ - return (_vm_page_alloc_noobj_domain(domain, VM_NFREELIST, req)); -} - vm_page_t vm_page_alloc_noobj_contig(int req, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 49f4c0fbc0cb..61a0228273c2 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -614,8 +614,6 @@ vm_page_t vm_page_alloc_contig_domain(vm_object_t object, vm_pindex_t pindex, int domain, int req, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, vm_memattr_t memattr); -vm_page_t vm_page_alloc_freelist(int, int); -vm_page_t vm_page_alloc_freelist_domain(int, int, int); vm_page_t vm_page_alloc_noobj(int); vm_page_t vm_page_alloc_noobj_domain(int, int); vm_page_t vm_page_alloc_noobj_contig(int req, u_long npages, vm_paddr_t low,