From patchwork Mon Apr 29 22:44:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13647844 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBCB5C4345F for ; Mon, 29 Apr 2024 22:45:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AB0FE6B0098; Mon, 29 Apr 2024 18:45:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A61F26B009A; Mon, 29 Apr 2024 18:45:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 950006B0099; Mon, 29 Apr 2024 18:45:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 73A776B0096 for ; Mon, 29 Apr 2024 18:45:03 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 23FAD160397 for ; Mon, 29 Apr 2024 22:45:03 +0000 (UTC) X-FDA: 82064051286.22.D846011 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf01.hostedemail.com (Postfix) with ESMTP id 21D7640010 for ; Mon, 29 Apr 2024 22:45:00 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=XOrOnr+k; spf=pass (imf01.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714430701; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=TM3KjlQ9V56LHlkXYrHG6s+0+6RTopiNfb4ciPvEtFY=; b=Zn9JC/KVC6Y1DW/0MdpN5VtIJvpiVPXVU2bMwdSXCB1SueGf8HaTmtbbaZQuZOO89nOeVC Qh539SyHxtPP4IdIZcCZ4JtnL9nMBO07QkBGcjcCYiW9vhiNSFS/uEIfTdPwc/Uk/2cZcX vH57qnBxZRN085vvbkZq8Dg8jaL1nNo= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=XOrOnr+k; spf=pass (imf01.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714430701; a=rsa-sha256; cv=none; b=qOx5qQtD5/Biyk+YGQBILLDlOYKDm/89teC43OzHbu1JdDBQ22sIH3SvygesfikYTyRjSX 5duTzbQmaYgV1TeN48FwdtCE0cFcSCcQpE9XqmeJbCr2hecxzZAUvIsRuPB9Ejqqb4/Y7k X+l0n8t/mmc1fUXTJKa6iLzalA5Mvx8= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id BB70DCE09B8; Mon, 29 Apr 2024 22:44:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83B92C113CD; Mon, 29 Apr 2024 22:44:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714430696; bh=SuQisH3NEJlIi/U4/Jd+S9JnCjk1XX4cGbCrJ1G43QQ=; h=From:To:Cc:Subject:Date:From; b=XOrOnr+k4jD2edkwQH3alhSvEJoLSHQeQbV0IZQTMjxdfbJwZQZRsdBR3PS4/r0+o RSZ+qPe8sEex/FzLlqZkdxpgSh8+c9SF3oTjCxcAZrso/Ys7Jg1CGUyCv2QBp9U/hf T3lePgdYhBulF9RuQaGzTEbL+/3iZBhtgwof2KGvpCMKwl4rNDlTL5X4YgCz/hxTH/ MATA+vdGM6qW8pX7J08BRd7JxGyKcNDlqh+qmcS1TSxqym+TuymaBXReeybt3MfFxC 4HBtfSMIRPZ/YgwVyORSATuv248HePKWfKYmVPndfhb73bvGsi/Sp39M9jJs3QdHTX G5trp2uS3WOzQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] mm/damon/paddr: simplify page level access re-check for pageout Date: Mon, 29 Apr 2024 15:44:47 -0700 Message-Id: <20240429224451.67081-1-sj@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Rspamd-Queue-Id: 21D7640010 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: t38tu91wqpmd4y4cc9gt6ijzyb5yw3ih X-HE-Tag: 1714430700-624846 X-HE-Meta: U2FsdGVkX18NJbndmWMoLjPl25WUp3e2HrSSSeJ4Y7sLn9W+y2clbt4pRVyCoZjVbYPrprHTByAcoXfw9qlh48MG9XEKwvmB+aPc6HyXU19ErtCiG/KOh11xBXb1TKOnscogCP8jOs2xnn2Th72u4yKnmT78hWS7XR2m9Eei4qagc3z6BBYl55H+7qCm6vhozCv3RbgkAPa2HyM4uerLU1Get8Tanx5yCrtNUKAtrDyViNdttSJmzk+19sFLkI2Sa6bmnaXVCW+k0kn2DG0kMkimqNvIHHfOjCyyBzw0zfCwE3yihnMfvm3uv8/C9QQgEdZRXBDmDEnr9UtlGmQxT7oPoBioH9CUkKbslCqRrz51+HSvoy4mNZJ+sRMo8isw5v5GsFuY/nsonPifXYojAmlcZ/9TtpE8Oy1urH0gH/ZpEh4b/V8IZZbqURRuFiSWQgNuiKaZF8bIHeJGYtzsQCZMyytTAGH2s1JRIsRkluBU5kqz4NVVbaFW7QlQH3AfpqLcd0cJKvRfixfmmCcRTRq95Np83kFFOcnuU7E0fHtUVSqqGpJKhCQaD74/eq5sLCsrpGV3+IDwHdy8uqdFNRiyWeJmmE7v6/UrPKEhMi731iM4elGNlNjFrXixPyfr0BRyo7LO8yHOOntM2mWBp9wl8spGKjFQgE/umP1UWDquvduQl2pTf81vDZsBO11Fqarlg5g7TAWVnKvtJUF9Za+kYjFQ7sF0dfx8QdpSvNTctGjRfhlO7/Q+A/hJgoHZ8s3r6LkeVytuf0sXZvFNZJQdrhmbur3vxKHge/JROAiHrfe4ZmIAukLTO5P7WaymJy2KXGdGyeYvgYGifOP6tUcfYIGTf5QO/EU0/sE5SL8A9CpLGZg/z2hqEYBfAKdbDG1zrfvbW+FPYCcafoQ0exXeD1yi3cJONbuifrDzATHfM9z+XRv5A+q7Dg8Etgn5AlYQ4KvXgCXOfTBLyBU v4UcKHjo LNxEw5HLLhHahREPgwsj8kDbRRqdDBEhMFizOjZO6X/TvvFNcSLv8rR9Us1jXDYLXamc3HRNSE5ErIeeKRUywczAjDmtVZqYdCbpA0RbNf26lYyFZbD7USkW2YqVmsAFzZifqSPlJimCLvPYfnQEGywAlCyTbNirtYb2b7qXu5ba7YS8= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000003, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The 'pageout' DAMOS action implementation of 'paddr' asks reclaim_pages() to do page level access check again. But the user can ask 'paddr' to do the page level access check on its own, using DAMOS filter of 'young page' type. Meanwhile, 'paddr' is the only user of reclaim_pages() that asks the page level access check. Make 'paddr' does the page level access check on its own always, and simplify reclaim_pages() by removing the page level access check request handling logic. As a result of the change for reclaim_pages(), reclaim_folio_list(), which is called by reclaim_pages(), also no more need to do the page level access check. Simplify the function, too. SeongJae Park (4): mm/damon/paddr: avoid unnecessary page level access check for pageout DAMOS action mm/damon/paddr: do page level access check for pageout DAMOS action on its own mm/vmscan: remove ignore_references argument of reclaim_pages() mm/vmscan: remove ignore_references argument of reclaim_folio_list() mm/damon/paddr.c | 20 +++++++++++++++++++- mm/internal.h | 2 +- mm/madvise.c | 4 ++-- mm/vmscan.c | 12 +++++------- 4 files changed, 27 insertions(+), 11 deletions(-) base-commit: 784e2d5fd3231ad7cad0ac907be4bc3db30520c0