Message ID | 20250109175126.57878-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 DC8B9E77197 for <linux-mm@archiver.kernel.org>; Thu, 9 Jan 2025 17:52:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EEBAC6B00BB; Thu, 9 Jan 2025 12:51:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DFFB56B00BD; Thu, 9 Jan 2025 12:51:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C02886B00BC; Thu, 9 Jan 2025 12:51:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 4D4906B00BA for <linux-mm@kvack.org>; Thu, 9 Jan 2025 12:51:49 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id EEE7E1C6012 for <linux-mm@kvack.org>; Thu, 9 Jan 2025 17:51:43 +0000 (UTC) X-FDA: 82988656086.27.10215FF Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf29.hostedemail.com (Postfix) with ESMTP id 6CCFE120011 for <linux-mm@kvack.org>; Thu, 9 Jan 2025 17:51:42 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=h2nx70CS; spf=pass (imf29.hostedemail.com: domain of sj@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736445102; 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=ppnXHYuRyCO9ER6Am0pnaomaifGzFLjVn3gXqBXeWP8=; b=VBFG7pjgrs7HnDhj11DctClmKyhXUX8H8O35Ea7tl6Kr84kR130uARmP88ej8up+SMowEN +juV1yua7f0niVv+LsVk06/5pnS/gbXdfElW6WND0U1JM7/i1nXtwuv5mW+6WxAsCx2vyW F3nBXovO4zBuhUbTEA5hCx+YAfQ3idI= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=h2nx70CS; spf=pass (imf29.hostedemail.com: domain of sj@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736445102; a=rsa-sha256; cv=none; b=eJI8b0SXKq/oBCa3iE8xJRi0Oqoqd1G6UM2y9PosccJ3KK6OjWGwTZcRVgFyKghzBHlsyt JdlZyqrLOfI3sKeI+FdKXrRDm34/++aSzB6r2r7pBVIcYZxXVBO6BoQHm+g2R68Zwxwtj+ 597itiei+/CpmqYZsyJmXIiLRPhPQ3E= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 3ED76A42528; Thu, 9 Jan 2025 17:49:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 474E2C4CEE8; Thu, 9 Jan 2025 17:51:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736445101; bh=xBH0b3NhxWYTGElmoBJalgG8ZkJmFacZfKWdD6zTD8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h2nx70CSAa1D7NJ1Q+cniSmR/Cs12oa2tSDvv2hG1MrjskAGMUls70M8xr21kMENF 4q4oBrSWzKZkaACyQRBmq70GxYNaZdA47qMw1vGxo9rt4Ku8cfzxiOPHsEeIv59ZDc qXLs7xqDVw10ku1W8NLXWOJFEuLyF8FurvEfdJQ2kqTKgcoAmTBMQu22kmd3nO+zGe YbRgznO0p4Z79IkRv+Kyf8TKpyp1Sk4G9VItMY+3WB36l/+AelHeX8q2MaiNKkSGZj WjQfKQVn8KHfHrpm2FrFCHte+if9KtE0kky8UjLhkiXN9kqr13ZOl5S4S4XU9jvfFa p889H/fWOEIlQ== 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 v2 04/10] mm/damon/paddr: support damos_filter->allow Date: Thu, 9 Jan 2025 09:51:20 -0800 Message-Id: <20250109175126.57878-5-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250109175126.57878-1-sj@kernel.org> References: <20250109175126.57878-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6CCFE120011 X-Stat-Signature: ck7sxshfu8ifi619ut9y6hhb63eaapgi X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1736445102-167899 X-HE-Meta: U2FsdGVkX18LLtpyDeBbMO9Q1uxAxkMaZVtgecsIDv/a07HftzksewMpTrSXP2GLK9LjIvxjuClLNJGit8LnF/kfXKlQaFpNhlrAM+4QKn/5oAh3JAghFZ8ZrTdBx4MNt4Xbj9WynRjOzAjjy40ov3x8qbA8E5Q1qr1VjVHAPFJ4DgOIHJefvjogbrWJT7s7EY1wh9YSWNai+fBN8CDbZIrSW/jI+pBPvtM7N4heGwU+H8ZZ1jkjKxA0XLp/XDbQfGVv1sFDd/l11OP9Vfpr6CNkufIIKd6GRf4SP7ieGe2Eq9ixCdI0d5tKLNnu660QiqbfSvMzllHpBv7hd4VXigFya8KIoGJt+ee7pYkjITvuYiKHWXfoYPGp+UnXx0hDDHceuvPkRBlpYSuqY8NdndKeoDUD4UfwHSV34e3qDGbyJFypsTC8nZ/Tmoeh4jKN/vc9mM40QT8V5eVzvw+URY3/Kci77Z/uYNgfU2SCubgp1oSB+anHwyVZp3IyRBABAhbDmtVKw3QL9rCXU2w6HSJFRTA+fesQwQu4r7KmWnh1iKfB/GxPew3TnoNODOdpm9T69LBkw7RJWy6zJuGXhtVfYbaf6OqZjyJD5SMsT+1JwKSKS3MR63CW24lCzQeujEPojvWmbFGxeNM9333CXuM1FnjRwL+C1LPMi19Vrf+ydr62mY/apLxLdYPHfDhzpnBuACW4ZfQzo1fTdZ2gMJg7ychu/0OlspKn6ihONDl6CFicmQ8M31elFWBBcELhv5AMDr57D3y7JIv6DX2eCRalVT8wgDfZ85A9JGJIsFaovCO1Yl5DFy+prHwIC0ESM1Uml8xIIZ8bfh7LBgNe8OWrclRZZ186OHSivac3M3UiwI5tIHIByO6mIBrDaF2wmSWXMY+TO9/RR1D41IllGwfV4XvrhYfwYI1cIVbqNsAAaExh0y/tKehBCBaHxl7E1sEpp0+X8EE9UhsduZA ZMOtmcwS qJ0OKFg2P0Xb7IY6N7Kbrq0o5GJhtZxntr73yJFYAZ4yfSVVQutc+i2l9XNli9kVUsV9RWXqTBB/HLtgyplUv+5I1165HKfEOa0h8luEaY32HnXSexqOXRTFH2QP4iht5dEt2cxvin0a/sQcwetns8n4prmGN4mbWOCjt0fEFEI9avJYMV8+DVgY4N/c8xdUJNrdVemjlE6vc49dtOUQKvpXZ9/UDpn6KA1ocK/+MHvHTrvb45RYT70/GgbschgJ+dBMKshoAaCAvrGTTfPHo8DTD3w== 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..817acfd4f8a2 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->allow; } return false; }
Respect damos_filter->allow 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(-)