Message ID | 20241227210819.63776-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 E6A80E7718B for <linux-mm@archiver.kernel.org>; Fri, 27 Dec 2024 21:08:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 754EB6B0089; Fri, 27 Dec 2024 16:08:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6B7B36B008C; Fri, 27 Dec 2024 16:08:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 509976B0092; Fri, 27 Dec 2024 16:08:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 34CA56B0089 for <linux-mm@kvack.org>; Fri, 27 Dec 2024 16:08:34 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id D74AB160873 for <linux-mm@kvack.org>; Fri, 27 Dec 2024 21:08:33 +0000 (UTC) X-FDA: 82941976908.04.0278E75 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf10.hostedemail.com (Postfix) with ESMTP id 53A98C001C for <linux-mm@kvack.org>; Fri, 27 Dec 2024 21:08:13 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=T9gQaHeb; spf=pass (imf10.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 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=1735333682; 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=xQLQDjrGB+WuBOLu6rdAwhwOePsavoz8t4Zp4W9qHdc=; b=BNgZBsnBqkPKbk4GZq19oL099ue1EhhvSq8plH+POcGQIU1Jnr00bHBgrUuL5MJ0hPjKit iCD5jviXsIezeeOkE+B1EsAup4H0/Y8QjvPCKSful1/XmmxUysfk3KwzLqF1zFqwQi8Nda M3JEZ25WyzcZYee1/FaLGU+3FDCDAKA= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=T9gQaHeb; spf=pass (imf10.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 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=1735333682; a=rsa-sha256; cv=none; b=m5EyugRdGI1s5n4+SUy91zvKGqoMs/q1bV82vcu7sd8XOY4dfVnd+bjkTsfoaWGDfSFz7O giWoIPKNw8u0bqeFfhyZ88Y8j513CuEQ85Bi78ca3dPh9wsEPuAnxfakCwRiHVlUIUXIeX CLnF2MVTQ9kEHfsAIDi9uxyaJCfiZzM= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id EB3E15C603B; Fri, 27 Dec 2024 21:07:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C83CC4CED6; Fri, 27 Dec 2024 21:08:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735333711; bh=SeMHzC1M39t8q6CCCk8soRnhB4lB7Sy3qIRyk7EYfrE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T9gQaHebXbvQqfNyFuj5hWQDHLpGC3wzkpL37XweUv3w1CsosT2Q4AHPDfRQOLacG ChYhjPlY7LsFa00Zd/U+inTizRccRAYmIINCnYnS/yTaMflWorTQkXLLyHWU1XePef e7DexRXVaUxs8RxQawG0QuGuTRaUJg4ZN76rPpzyPEuCEh9Prz+/um2oFGFPdizJfK 4nnbrCmDMAuWQR0b4vlz/KlZBAdIU475j9WWH/rZGzqXRuC/VYYqzRvDB6FeKKxkva Ke1g5Jxvm+OQqs3MkQrPOK1PJMe5nVR8nG7rP9awY6rVVdYcMjz6qg1mBICTmOKqhq DdOX1E6fsswTQ== From: SeongJae Park <sj@kernel.org> To: Cc: SeongJae Park <sj@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, damon@lists.linux.dev, kernel-team@meta.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH v2 04/10] mm/damon/paddr: support damos_filter->pass Date: Fri, 27 Dec 2024 13:08:13 -0800 Message-Id: <20241227210819.63776-5-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241227210819.63776-1-sj@kernel.org> References: <20241227210819.63776-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam05 X-Stat-Signature: xojz4kwzfebipe7h1rjhyyjmy5xq91ei X-Rspamd-Queue-Id: 53A98C001C X-Rspam-User: X-HE-Tag: 1735333693-507163 X-HE-Meta: U2FsdGVkX18roFQPHVsaQZGszQrXAJTOCYDby1DXltUwWEkxfhwYZ6yg5ijn3EWWWlhLhbTx55CRkuMLsH64b7SRXUFdAzc4Y1woEYWE7dKolrhBJSDIlSKPxOVyhsRcJo+3MeM1I5iyyXYO7QgRKDUOMXYxE7b1Q0KG/qpEir+MsgZbm1eYQ5AK2V8MhjEpB0Gt63vOP8j+D2hVDlsntzKHDyEtkjINGoW7v17YiXOrjrDwg0Cyouodl2vCywy4AaPARkl4DB9znYodZGs9kJ91Vwoen+23EWLFbeEhLKW2pB4RBynbEmgoAIyI+0m8LClP9nG30qoxJrEm4Qut8tg6IuWZwUns/dm82JxpwElOs4oq2o1HLmJ3kKy3UR9w/GbXvvS1PsAiI2BjNA35cNsWfF194MzW9mZBzcr8jUK+RPc+F2DK6tXeRbW12hNvICZAxCcvYWm6WPW7VWLvqRsYGtOMauSYUij89cNgQbT5OZpIRSQQI/5UvZo3AUnZ8DB1qe9ZSCNvprKKezRy8PlwO3j8jKg+kSLuxBXoSQQMcZ2dLLqHvuidQlYsP4qnTSJybc31Bz5cwWFmwjmCucm0HIpxNvAQpqHsy8nbGpl5JulXHhwvA8z3QzMbOmx+WhuT01TvAv4Pd9oPZJUSrqO+nlZZ3bOv0ZwY6MWJfuuGS+OSsmxjpLL0x9DYm7nQqjD9sCHf6zalqE1ZHacNcXDIoIu4orV9jWojsQRQSrIvjAPYd8jVFDtpYwr6qIHRnDYpvBmGdrgyVrt81G2RDJ2YOp9ywuR8DXGGdra2ZkRpm1HTpGy89dqtgnWXjt23poX/FeIknqyKSp6GXdFy/yv9x69JpaTBh/D6VQGo0wlyA9VgGPkom8G2bvaolHY9roCqPzQTdL6wsUSUFcGuKL8cpVzlkRX4N59z4JrIze+r6q9iLkJpM+TMMA9MSMWzKZ6LaJWudkP/rFII5wR CfRi0o/j FtOP/yJLrTqfCzlluaU+Odd7MJacQlTTVeWfPe0lIQYS5rroaS6M6VwgmFTlt4g8B0wVF9Xp6CCyGz97xlEh6SBd/Hkz8eRBLykYeZol+RyVbHB/ZJEZg/oQyvT5TDqeT6rS3RTDWQZF8kDCoNApDfXRe6KboqhTpx/bewzuF//KYuRUWQwq+K2GkWLr2bJBP2NZnlXtWM25pFGdmrRxG1BaaU8yYuC2TEFLbayJXiBFxIPkbAOS7BnwGG+IxnX0nSGRNvdkwfDeJJ9nl7vJfWScKAg== 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 of target memory
|
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; }
'paddr', a DAMON operations set implementation for the physical address space supports a few types of DAMOS filters (anon, memcg and young), but ignoring the ->pass field. Update the logic to support the behavior. Signed-off-by: SeongJae Park <sj@kernel.org> --- mm/damon/paddr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)