Message ID | 20250107201739.79484-5-sj@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 813A1E77199 for <linux-mm@archiver.kernel.org>; Tue, 7 Jan 2025 20:18:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 02E7D6B0099; Tue, 7 Jan 2025 15:18:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F23126B009A; Tue, 7 Jan 2025 15:18:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD4EA6B009B; Tue, 7 Jan 2025 15:18:15 -0500 (EST) 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 AF0E96B0099 for <linux-mm@kvack.org>; Tue, 7 Jan 2025 15:18:15 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 64800160C6B for <linux-mm@kvack.org>; Tue, 7 Jan 2025 20:18:15 +0000 (UTC) X-FDA: 82981767750.27.4A8955C Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf15.hostedemail.com (Postfix) with ESMTP id AF89AA0007 for <linux-mm@kvack.org>; Tue, 7 Jan 2025 20:18:13 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Ap52vc9L; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736281093; a=rsa-sha256; cv=none; b=1JA0Zz187kBWKpc+7s4ogGr7nLvlv3jP3rktuotAM1mSw0MrTwHpTL8HxuNR+3tOvq40tK VtC02Kf76fRj5E72j8KXOrSSygOTioLNu84q3QaXGABaNM3mPCFrLZKD8CMcEksApyR/h0 Hf4mMuS7E0sgaRhznceUKRp4J3I6rzw= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Ap52vc9L; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736281093; 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:in-reply-to:references:references:dkim-signature; bh=l+ObGmxyfKM5RUghw/bMm3VtsO+6YPMmFjLe8kbLPNc=; b=C5JrAK1uvb7RqbvzGdq0du17XF1rdsED4m6M6fKCDoKV/WT42fk+6fZDV1uKROUPkR7/SN C65w7csqiFwx/WpS+P6kbZyno6oMluFBd3kkSI4idRSnrWJgRM04DeuhwqmJC82iDExs0J PFF11SFgBgILoTRAuA8yc/x9hiBvWvs= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id CDF795C5EA5; Tue, 7 Jan 2025 20:17:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7607CC4CED6; Tue, 7 Jan 2025 20:18:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736281092; bh=tuhpVdSKJ2wYJgPTltwUOs4MNNvfzkT5HUY0DvCph2Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ap52vc9LCXHiCrhKByqmNaZeFczwv/M3myDnZsagTT2jKr3KDAlahQJP9r5GqYAmv WhKuWXffp4rYtiwln3h1pBXvNPlXzU5tSlvAD+ws9ysKEeBkh3meWpdRD0at3HjVj0 B6Hq4BehmjXL9thObdsImAwxK7v2vNkDpEhocsaSygZgLDB5wF0SdLxwu4IKQqnvOc 9Z0iH54fE6QJLIO1AKsEAcxKJ7AN5BMaRMldWHKy/oMeF+1X3FzQLLP8URzqoY7/ZH lfW/eDK4hEYKmg6YfVEWrTK2waCVR/PjjspebITjSF3NVv4J8tOWw+rvDOyehpGgYf 31sLK6Tcvtk1A== From: SeongJae Park <sj@kernel.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: SeongJae Park <sj@kernel.org>, damon@lists.linux.dev, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 04/10] mm/damon/paddr: support damos_filter->pass Date: Tue, 7 Jan 2025 12:17:33 -0800 Message-Id: <20250107201739.79484-5-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250107201739.79484-1-sj@kernel.org> References: <20250107201739.79484-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: AF89AA0007 X-Stat-Signature: du9ghx5esfut3dhyoiio33jbd6jh6xp5 X-Rspam-User: X-HE-Tag: 1736281093-914056 X-HE-Meta: U2FsdGVkX18cuu58Xrlp5Xt696VDH14tXF2cqLfw5beMMW9SluF7ukwaOeQP014O7WpuAEJVW1+IEekl/eFG4RBwMR3JPjiAzowummbPRTflhokNn0mwo4wQeuTxhpjhslM1rrLEQtgIOxzOTS/Puf2uv10SdsBnKupBjMdbktZ+PILJgegkccpFfWqsDeQAGZYBo92uRY4AAWdoAjQ49GhPbFE/TUu38hJYEGuIkOvqThtBZwOIXPcwRgZVxS9Wjxg91C9cFLnz6DT2JlxsYH5f59Ynkaumbptg590XeR/YM4dGSBqCvyVnIc1qgdCGApIwDzjRfgXDGijIseK8PnSWIjYt+LH7RhpNNuThbcbnyn0GxQx4IVMy45KMvAtZ0y4X/IMl1f0Yd7p2iby2S20FjagxHqO/DAxm80sfEBjNi5hE4AmlRuStCk+iE/j83/pcFQgq6vY05xPqLV8rvZ8XV2heMK7bmPLRErFNlc5JvBb8MnnJdR76i/PAbnH5Ig/HAVj38k13qRjDeU0cKLABWA/kJn3Bz/qlr7GmEHkcfZMlMlF+P9PGvxnGIc/GlRJsPGIh/kWu9KDiUl6sj3JAJOE6138X8N8BqE5lvnrJEN4xpXD9brLTa0g6s72lk/4ldToGx9GKoycxA9XOKmmE6tauAYfIb32Cn0ja0yoepIwnqL7Ef9xrNxMcEQMqwwDyRmk6TCEbK8XaL79UNabmnIBi3xrM3+VjzNC7Sfl8hkq282MWiBAjpuXHYa2gYkfquZX7EMPQP/LvUaVmPikgCEMV7RBanRdfo2x5AknepDBAh0MpuMRWh91496GdvKw2ifYbN2N7HT4xflAuY4bxV6qAB3NlQf0HjdvlrA2nq/3dfmCxEdXwW799qdB4p1uskuT/1mZ5EgX+lKKp0r3f7YpM57BiyRhPyjqCb7s9f3Hk9jYctsTIGz9g9myox5y5S+OCSzGj5GwlcxZ pk8Dh5i7 Hh5WaiQkGUEYbsFfTC5t2hlWGrAinZ7BpyKQhm1TXGx+R/p2q9fQNXgGW4uScbuDo1re9A0PFU3lmGzcv47L+XI9Qi9mjzeGCGcECXsuihv2CCiFMcoxRiFuZDP9sjWRerWqye+wnF2qQa/FVAf5Pi20+fcgE4mLYrJPjeDEEKczvQHpl4gsxBPZqkUPYlZR8biDVgp5Cl1p1N0UCXOStmGU1mNVrNPeqaDhplF31f5MDjaOu7QF1UfUjAW+1AXTCY/epvedzhfFFpDcpMbopBOGVEQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm/damon: extend DAMOS filters for inclusion
|
expand
|
diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index b0c283808ba6..71cb02128b46 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c @@ -198,7 +198,7 @@ static unsigned int damon_pa_check_accesses(struct damon_ctx *ctx) return max_nr_accesses; } -static bool __damos_pa_filter_out(struct damos_filter *filter, +static bool damos_pa_filter_match(struct damos_filter *filter, struct folio *folio) { bool matched = false; @@ -237,8 +237,8 @@ static bool damos_pa_filter_out(struct damos *scheme, struct folio *folio) struct damos_filter *filter; damos_for_each_filter(filter, scheme) { - if (__damos_pa_filter_out(filter, folio)) - return true; + if (damos_pa_filter_match(filter, folio)) + return !filter->pass; } return false; }
Respect damos_filter->pass from 'paddr', which is a DAMON operations set implementation for the physical address space and supports a few types of region-internal DAMOS filters (anon, memcg and young). The change is similar to that of the previous commit for core layer update. Signed-off-by: SeongJae Park <sj@kernel.org> --- mm/damon/paddr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)