From nobody Wed Nov 13 14:15:17 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 4XpQKd3vxNz5dfSM; Wed, 13 Nov 2024 14:15:17 +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 4XpQKd3LPlz4n1R; Wed, 13 Nov 2024 14:15:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731507317; 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=sY+ejOPCVH2luzH5SCgwLsFWWAzPRXyVW0AWXGuSfkg=; b=VKcwvxeKtb6hrRNdD15ZH2slTcalLlKTK+6uZf/w52ISlbmbE/1GBh/laLqA88HQgkCI53 /hDxeKijYtnNwz3fDvXF02kR0i9wLbQBB93GHLW2zgmHYdvxvuvJOrpr6ujocA3WQCcz8D vaIk+87gR10fKLYbi5G8JFyLVoz8+W8W6bO9CgwXXRI9fCKRAyVXlZiayJFN1AUIgMBHvW TqEJV7TVqCBV60UowRp4ZdTxAZEYnhjCTEOqPL1tP3bE0H+X0REUBg2rPLLOEAQzqf01Jj TdKUkdQRjLdf07t+RiLf5cmZM+txyEfdVg/dSylxqcEklKMcq0qPRFBM4cdSbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731507317; 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=sY+ejOPCVH2luzH5SCgwLsFWWAzPRXyVW0AWXGuSfkg=; b=QrAqoB7XZ0Cm57P7NMH7Edv1mtZHmrnhQiV9EG9JnhCA+G74GPfnL8DE6XxAUnWLgOD9Co 5CAdsc7AxT1eqsHG4rIHwByksnP/SkerYCFN+M/z6GWRiOPoK60agl75h+R6m8dBk6Htsa Eas+vJCl5xTpiGb9hINtItJ6Zm956VmSzHdUciSRNaSQhz3nH5QGgysdrTQU1OJQofb9ii rhBMVyib73H7Q1+HFEvO0/vLQOxul/DAsPsHzGwgfoukT/v5teq4+Zax8PC0HttqM3QUa4 zKay+24opdxv3Fd+HNJX3JO21Awj9qdI5w7H5/Vhp9aWjhZpsN7RI9wn6f+Efg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731507317; a=rsa-sha256; cv=none; b=dh0R2HE0D6d6KKJndwFbT02ogTH2+IP2mMmoBHySccbYeDzDPltIskBBWShCaHVYjZ5PaL LHRN4aFapcIX1P9AK7PRZEiM3jPRwsSWTRzTsR8AozZAyWmWCBpC9jRmAMVqKWu+oOi7Ci tMr8fHIxogXZnknVZ9rrm5BuvWy7Y9h7DBS6K12xe3zlaIZkoy3CptnDKwXsR74KG1scFS EmfPILc7L7ZXE9TIL74Wnvp+44fT6/pDSDEqK7ckEaAgz9UqwoKl/LVd/6oCvOvGE7EGkk sPgRaD5s5azZ2kCHQlhxmO8DW7xDEab+IsTfEeDeYdstqV3+Hq/ypT3amt0i+g== 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 4XpQKd2wpXzxWQ; Wed, 13 Nov 2024 14:15:17 +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 4ADEFH76054809; Wed, 13 Nov 2024 14:15:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ADEFH1L054806; Wed, 13 Nov 2024 14:15:17 GMT (envelope-from git) Date: Wed, 13 Nov 2024 14:15:17 GMT Message-Id: <202411131415.4ADEFH1L054806@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: d11d407aee48 - main - swap_pager: Ensure that swapoff puts swapped-in pages in page queues 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: d11d407aee4835fd50811a5980125bb46748fa0b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d11d407aee4835fd50811a5980125bb46748fa0b commit d11d407aee4835fd50811a5980125bb46748fa0b Author: Mark Johnston AuthorDate: 2024-11-13 14:02:20 +0000 Commit: Mark Johnston CommitDate: 2024-11-13 14:14:32 +0000 swap_pager: Ensure that swapoff puts swapped-in pages in page queues Readahead/behind pages are handled by the swap pager, but the get_pages caller is responsible for putting fetched pages into queues (or wiring them beforehand). Note that the VM object lock prevents the newly queued page from being immediately reclaimed in the window before it is marked dirty by swap_pager_swapoff_object(). Reported by: pho Tested by: pho Reviewed by: dougm, alc, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47526 --- sys/vm/swap_pager.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index a402516fdb0e..db925f4ae7f6 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1998,6 +1998,7 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) vm_object_pip_wakeupn(object, 1); KASSERT(vm_page_all_valid(m), ("%s: Page %p not all valid", __func__, m)); + vm_page_deactivate_noreuse(m); vm_page_xunbusy(m); break; }