From nobody Sat Nov 09 19:37:33 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 4Xm5gK4c5gz5cZFr; Sat, 09 Nov 2024 19:37:33 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xm5gK45hRz4Z3v; Sat, 9 Nov 2024 19:37:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731181053; 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=kLoOG6/Ha4DHfFblwGSFwytNFur3JIy/x3hnh6SeaT4=; b=iKN60pj9Gr2StWNZU8regDP5FsMY0eVlHMuBgK2djn/KOghjPAKPzKfam+adxD2hEDXxpl iKgyyDNtMKqfLr9x99/lpIY73U0Kw5FwIAvu1nW+Irz/ijoqZSaJt/w8BbK4/hr7G0cBWc dHb80B5odlmnrcZw4UyQWZ1Mt7AdmQQk0eVHpuLlIPdX/r6PbOv5epsEp0KcJVKbaO2iPg ja+5vGnm5+gmldLnDpBBrtihGyDjVL9Z7Fdi0LfTs+XkNleGOR62pxwWaSJZ5MCb8Kq5gV k4qmxTmg+Bz85IXmE2rhuGTlHOuICOUFC5/n7bPSihaZHF4vujek01YekQyJuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731181053; 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=kLoOG6/Ha4DHfFblwGSFwytNFur3JIy/x3hnh6SeaT4=; b=jPd0Yby7ZElayUjKEPO0d1CVKR+D5a3+ylBUXCQboEcBuKA61BeQtYl9eAcl/Use28VibQ VgyQnbfehbMoNovYOUzvpjTNOP0wpuyXTInI+jfw1nENuyYERdQjN+NY+0H8LNAhizA01C nLq9KG81rsj9So1PS+et4ahiERj7PmdpY8pQGgJ2PxAvOy0ZcsYy8GGbnPr13gG4Czq6G2 Hlo3NQFLw6RnJtIQedlYOW8t18Mb6FAbU5JZKf5X+B1w20bmFsZuu2crrA3ma56hnh5sXD OizocLtypsSSsfKgZtJJDqUZtOv4WfCQ3NSUO51dfpSbLvo1CcJdiuiM2rgUGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731181053; a=rsa-sha256; cv=none; b=U0abaDU2E4s/egqm7WCPhArOH+fP+DJmnF7cs8YFDblPDO9omL/ikRzdDaJQZoJ9XvyJJJ y2dRNngLtlg1ZM9sTsY5MdG/QOL8RXB6KXDY4HHwYs7lFEQDElYvVwbo3o/J5sNchkf3A/ R5ss8N5BYJJja1N9cw81GaFg7SrO6YBswxTtNu9S6M6UHCGxmvCvtoeB5lZq+RRvR9Ri0y NK0G0Jvyil3enochjpdfPOVzLHta8j59xUJ3zpvpsPxKdT/F0LSbRIPiTsVlrxM2obj6sH Am+KUzlJnZg7nC1+2PecSk6uhWZchWaJwSBNcuwW89KoIcIcEdWaW+GMmkXkSg== 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 4Xm5gK3YfYz1Qk5; Sat, 9 Nov 2024 19:37:33 +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 4A9JbXCF057682; Sat, 9 Nov 2024 19:37:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A9JbXk0057679; Sat, 9 Nov 2024 19:37:33 GMT (envelope-from git) Date: Sat, 9 Nov 2024 19:37:33 GMT Message-Id: <202411091937.4A9JbXk0057679@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: f3895e983ce8 - main - vm_radix: Add iter lookup_le interface 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f3895e983ce82474e3ae5825baa295ec1c923203 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=f3895e983ce82474e3ae5825baa295ec1c923203 commit f3895e983ce82474e3ae5825baa295ec1c923203 Author: Doug Moore AuthorDate: 2024-11-09 19:32:58 +0000 Commit: Doug Moore CommitDate: 2024-11-09 19:32:58 +0000 vm_radix: Add iter lookup_le interface Add a function to the vm_radix interface to lookup the greatest page less than or equal to some given page. Reviewed by: alc Differential Revision: https://reviews.freebsd.org/D47046 --- sys/vm/vm_radix.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/vm/vm_radix.h b/sys/vm/vm_radix.h index e1f7323dd205..561e36f2e164 100644 --- a/sys/vm/vm_radix.h +++ b/sys/vm/vm_radix.h @@ -257,6 +257,19 @@ vm_radix_iter_step(struct pctrie_iter *pages) return (VM_RADIX_PCTRIE_ITER_STEP_GE(pages)); } +/* + * Initialize an iterator pointing to the page with the greatest pindex that is + * less than or equal to the specified pindex, or NULL if there are no such + * pages. Return the page. + * + * Requires that access be externally synchronized by a lock. + */ +static __inline vm_page_t +vm_radix_iter_lookup_le(struct pctrie_iter *pages, vm_pindex_t index) +{ + return (VM_RADIX_PCTRIE_ITER_LOOKUP_LE(pages, index)); +} + /* * Update the iterator to point to the page with the pindex that is one greater * than the current pindex, or NULL if there is no such page. Return the page.