From nobody Mon Sep 16 05:33: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 4X6YVF5V65z5W379; Mon, 16 Sep 2024 05:33:25 +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 4X6YVF3Njsz47D8; Mon, 16 Sep 2024 05:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726464805; 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=vdXDsL3OwJhtPxhgwa4wmrDuHerFb7MDKK91XmotWLI=; b=y0kYIhMtBhMPJS+BJR1QJgQc4vTGI095zyGoQtwNEF4zulcwuIMFJh0J2QHCKq7xcnMITH by/gBgbw67NIg9BPg3eXkxB2clH5dQudmZqVWOfFJIKr6hnK1R7MnOeZUadA2G1iPvOnTS LGeiWCwSNLfrVvzJHGE/1Z3WJII5XI5ZWMtSbecq55kXCc7+wn2su8zEQojyOM8CiJN17E CpYHWzTSryf0KfOuUk1GUYxpFBlkE+UNyBk+Z3Vt4w1atSNnGprEOtjMtHLbdoD12RPJNt Zqbim96wMvl+hOyyCHJ4hSGmN0haoJRncH/r4Vm1o+anaOKMYrrDgh0DEAne6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726464805; a=rsa-sha256; cv=none; b=ruqkXPkIdNHzihKEXpnCE5BKUlUzOBYb10/lba9vLLteVgHF8lpTsOIWBX+6+GlXZiA3pB AQuVtxZem6A+xRxEMo1KrtS7RU6JGMgMVPuroDpJ0k9cdGrsPchPVBpsPVqB+4qCLcIuOP 9OgsVY7DSu6cJQU1h0xgcrMlUCD6oEUJ/j9YZc6ZysYxAf9awi6W8KlyN/3KXseujMvh4o m8fEVI0ej6w6qYZwazvi8oArff0SmE68dJQJleLUlYPXMLdcYQ4o2g0NaBnXlo1wSx4FKt bqm4CzoAE2oAjnqgwAkx/J/FqILDJmoxjY61aFtEttbOq0qTUDDCckg4iPleDw== 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=1726464805; 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=vdXDsL3OwJhtPxhgwa4wmrDuHerFb7MDKK91XmotWLI=; b=jFwWctA5Dm6+6mshqbSGIlZYnV0ZyBT3sXIyoURapOLFWXa18v7ofR8sJxVcf+5NL9C6Cv 5OI1hXokAN86AKOZGxQIK1XAJu0OrU0v8QfEVgj0OSmhKj0PnuBcjV+Fe8DBVJBh+yFi3x hkax8EdIYA3reWJKFlfNUx80ne6tsHQxtOxwsq+dXe5JXSBVK8JVBY1+QmU95UtO1VtPQt 7I18E9SG/mie+OQ1AMjGHOKSRlejHQNjhLUcU6MK9HoiJHoDZLlGQA/BQm4VQDGDFEVC/C E1BjymeD5hj2EI9u1iad2qrzxG2WIc9yqKRFL+G43QS3zy3Y7T5amJo4qzAbnA== 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 4X6YVF30cGzhmV; Mon, 16 Sep 2024 05:33:25 +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 48G5XPj0053844; Mon, 16 Sep 2024 05:33:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48G5XPs7053841; Mon, 16 Sep 2024 05:33:25 GMT (envelope-from git) Date: Mon, 16 Sep 2024 05:33:25 GMT Message-Id: <202409160533.48G5XPs7053841@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: bae517022c9a - main - swap_pager: enhance meta_transfer comments 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: bae517022c9a5945cb059cc59b0eb322e561d7c0 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=bae517022c9a5945cb059cc59b0eb322e561d7c0 commit bae517022c9a5945cb059cc59b0eb322e561d7c0 Author: Doug Moore AuthorDate: 2024-09-16 05:31:11 +0000 Commit: Doug Moore CommitDate: 2024-09-16 05:31:11 +0000 swap_pager: enhance meta_transfer comments Clarify comments about what happens to source blocks in swp_pager_meta_transfer. No functional changes. Reviewed by: alc Differential Revision: https://reviews.freebsd.org/D46682 --- sys/vm/swap_pager.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 64ae4ad78786..44fe4f34bb39 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2190,8 +2190,8 @@ allocated: * SWP_PAGER_META_TRANSFER() - transfer a range of blocks in the srcobject's * swap metadata into dstobject. * - * This routine will free swap metadata structures as they are cleaned - * out. + * Blocks in src that correspond to holes in dst are transferred. Blocks + * in src that correspond to blocks in dst are freed. */ static void swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, @@ -2235,8 +2235,10 @@ swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, */ d[i] = blk; d_mask |= 1 << i; - } else if (blk != SWAPBLK_NONE) + } else if (blk != SWAPBLK_NONE) { + /* Dst has a block at pindex, so free block. */ swp_pager_update_freerange(&range, sb->d[i]); + } sb->d[i] = SWAPBLK_NONE; } if (swp_pager_swblk_empty(sb, 0, start) &&