From nobody Mon Oct 07 16:12:50 2024 X-Original-To: dev-commits-src-main@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 4XMkhM02jxz5YNKy; Mon, 07 Oct 2024 16:12:51 +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 4XMkhL6KKhz4VvS; Mon, 7 Oct 2024 16:12:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728317570; 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=7e6WXIkhGJV+cffQltwi4OJmZP+viKosiC1sw1zrELM=; b=kbWKr7x2Dz3fCtPswQZGM883SkGfgyOxo0eIfrbdtxBOfbbfSGyXIRTWyByr8e5GXZNT3N ruyfOJQkAwYjvdkjQ/ICcCbtbokrw2HKFQjLkGhiXGQkZU0KXov7f9os9TbuV1ubhGEGSX RPCl1C0AxVpJy86yjnQEjHWQTsa9ztVL7gH4NA5U4xEB6ajk45WiQgYbPTf3ZISrtKr2vM OQ+CHCPVzqKf9EsvL7nXQUgSsq00vMlHC8BQKB5aJ+yhCrrHqFVtYf57CLHNanK3SYU5+k oBpdeMLTD54/bcJNc713mbfoqvz3s9eTYjma7UrtZW/kH0jqdvxHK8YOQZ3U2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728317570; 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=7e6WXIkhGJV+cffQltwi4OJmZP+viKosiC1sw1zrELM=; b=cyHRiPDfoInQ+JmKoDCu42w431hWJEOUdIRxKMYmc1vldiO9aB2NR4PXxSkN8aC46ehlhG Z9g4MXe0cQ5UJrfmVaqV3lrvXE2GOY6ZuMAd+TM2PnqWgB92V5hXV6mx2E1nKFtWVtFrb+ +nsFQ+kzOiR2dlJJumlWHYIX0eZYPMlXLvqWKst5LKc1f917EqM0oqFlHNAJ/gQQr63Oi1 aZmFlOrdybotjYdbLO3QVH5QLu19Xm3t9F8dauvi+a6GmrHrqvvksSngn+8qAnwpk3Jmla gGmk4i5YjQiNuT6AkQLlUAa1pdCJIpiqZETKjnSRJGffkjT69u+ZMVJpD484sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728317570; a=rsa-sha256; cv=none; b=A8OVaARBV9VjwhQInvMcUe/aF5BjERmthG99egWqsw6EBs5UAYkyc8JA/GlSBBlbhw2FB3 7g5kLjXE0WA8pCW4GzSbuZfrOQL2QqjvaJCUx09lA+HVfEvLFjJkIoI5xTB7+UXQcTbXhi 1w0zPyQSqOXu6T/bf5tMdgVTMT3md9zaXH52Cs35LvRuFjBCPPOEW91d5QPUQKo9F7fQBs az7+dFQZGotUXHD0oz9907ChHJrHUR1dJTFs523wfLxm2Obql8yt+g1aLxNF6DA9CbkgfH XGCJ2s7Wzg7DMqWosdc20rvalQj0ZmUO4Lb406B3+ByKEgCrb8r8d3T0EDk89g== 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 4XMkhL5wFGzt4Q; Mon, 7 Oct 2024 16:12:50 +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 497GCoNt034373; Mon, 7 Oct 2024 16:12:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 497GCoQb034370; Mon, 7 Oct 2024 16:12:50 GMT (envelope-from git) Date: Mon, 7 Oct 2024 16:12:50 GMT Message-Id: <202410071612.497GCoQb034370@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: 6af02087d2c7 - main - swap_pager: rename iter init functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 6af02087d2c7333bd3de8917c73688607464be3e Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=6af02087d2c7333bd3de8917c73688607464be3e commit 6af02087d2c7333bd3de8917c73688607464be3e Author: Doug Moore AuthorDate: 2024-10-07 16:11:33 +0000 Commit: Doug Moore CommitDate: 2024-10-07 16:11:33 +0000 swap_pager: rename iter init functions Add _init to the function names of the functions that initialize iterators for swblks. Reported by: alc, markj Reviewed by: alc Differential Revision: https://reviews.freebsd.org/D46974 --- sys/vm/swap_pager.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 3a8c7e0f5777..807215647a93 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -564,7 +564,7 @@ swblk_is_empty(vm_object_t object) } static struct swblk * -swblk_iter(struct pctrie_iter *blks, vm_object_t object, +swblk_iter_init(struct pctrie_iter *blks, vm_object_t object, vm_pindex_t pindex) { VM_OBJECT_ASSERT_LOCKED(object); @@ -575,7 +575,7 @@ swblk_iter(struct pctrie_iter *blks, vm_object_t object, } static struct swblk * -swblk_iter_limit(struct pctrie_iter *blks, vm_object_t object, +swblk_iter_limit_init(struct pctrie_iter *blks, vm_object_t object, vm_pindex_t pindex, vm_pindex_t limit) { VM_OBJECT_ASSERT_LOCKED(object); @@ -1851,7 +1851,7 @@ swap_pager_swapped_pages(vm_object_t object) return (0); res = 0; - for (sb = swblk_iter(&blks, object, 0); sb != NULL; + for (sb = swblk_iter_init(&blks, object, 0); sb != NULL; sb = swblk_iter_next(&blks)) { for (i = 0; i < SWAP_META_PAGES; i++) { if (sb->d[i] != SWAPBLK_NONE) @@ -1885,7 +1885,7 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) vm_page_iter_init(&pages, object); swp_pager_init_freerange(&range); - sb = swblk_iter(&blks, object, 0); + sb = swblk_iter_init(&blks, object, 0); while (sb != NULL) { if ((object->flags & OBJ_DEAD) != 0) { /* @@ -1959,7 +1959,7 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) * after blks.index. */ pctrie_iter_reset(&pages); - sb = swblk_iter(&blks, object, blks.index); + sb = swblk_iter_init(&blks, object, blks.index); continue; } if (sb_empty) { @@ -2231,7 +2231,7 @@ swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, swp_pager_init_freerange(&range); d_mask = 0; last = pindex + count; - for (sb = swblk_iter_limit(&blks, srcobject, pindex, last), + for (sb = swblk_iter_limit_init(&blks, srcobject, pindex, last), start = swblk_start(sb, pindex); sb != NULL; sb = swblk_iter_next(&blks), start = 0) { limit = MIN(last - blks.index, SWAP_META_PAGES); @@ -2308,7 +2308,7 @@ swp_pager_meta_free(vm_object_t object, vm_pindex_t pindex, vm_pindex_t count, swp_pager_init_freerange(&range); vm_page_iter_init(&pages, object); last = pindex + count; - for (sb = swblk_iter_limit(&blks, object, pindex, last), + for (sb = swblk_iter_limit_init(&blks, object, pindex, last), start = swblk_start(sb, pindex); sb != NULL; sb = swblk_iter_next(&blks), start = 0) { limit = MIN(last - blks.index, SWAP_META_PAGES); @@ -2409,7 +2409,7 @@ swap_pager_find_least(vm_object_t object, vm_pindex_t pindex) struct swblk *sb; int i; - if ((sb = swblk_iter(&blks, object, pindex)) == NULL) + if ((sb = swblk_iter_init(&blks, object, pindex)) == NULL) return (OBJ_MAX_SIZE); if (blks.index < pindex) { for (i = pindex % SWAP_META_PAGES; i < SWAP_META_PAGES; i++) { @@ -2882,7 +2882,7 @@ vmspace_swap_count(struct vmspace *vmspace) goto unlock; pi = OFF_TO_IDX(cur->offset); e = pi + OFF_TO_IDX(cur->end - cur->start); - for (sb = swblk_iter_limit(&blks, object, pi, e), + for (sb = swblk_iter_limit_init(&blks, object, pi, e), start = swblk_start(sb, pi); sb != NULL; sb = swblk_iter_next(&blks), start = 0) { limit = MIN(e - blks.index, SWAP_META_PAGES);