Message ID | 20241226221445.78433-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 D9EB6E7718F for <linux-mm@archiver.kernel.org>; Thu, 26 Dec 2024 22:15:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 483FB6B008A; Thu, 26 Dec 2024 17:15:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3BFE86B008C; Thu, 26 Dec 2024 17:15:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2371B6B0092; Thu, 26 Dec 2024 17:15:06 -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 EC4F76B008A for <linux-mm@kvack.org>; Thu, 26 Dec 2024 17:15:05 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id A96AA1A01D6 for <linux-mm@kvack.org>; Thu, 26 Dec 2024 22:15:05 +0000 (UTC) X-FDA: 82938515352.22.6B9AB48 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf27.hostedemail.com (Postfix) with ESMTP id 61AA740006 for <linux-mm@kvack.org>; Thu, 26 Dec 2024 22:14:18 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=fQElKYiZ; spf=pass (imf27.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=1735251276; 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=TFMyi2NLnOrXS5V6MyUsqe+xnjhzXq8zMDdZoWdj+PrBXmri0MzeaBr7pq7YkJCL4/vNiG te4P21/Jlf24oxd9Po4v0gKMGah4GgTaIX2fv2px9K0ivivRyhU6ZwiwaIuIuoKXK2pOkq 40VODuySVm2H2ew57lTrLDtd/xjXPvU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1735251276; a=rsa-sha256; cv=none; b=Q7qBUGXCePbZoVD49jv0bPg4OXGZ0sHRLeahF9YkbCdYxqs2CeJQalUuFrbvZstoBOEAW8 ouLGlVYlEvk8K5QUb7Lt2vp9pEoYVg8/bTs398eGLijK6C2ooxUJKRsHyiJs53HVTt/pOg 7fxZCg9qTIVvzkt/IYtUbZZWpyYAe00= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=fQElKYiZ; spf=pass (imf27.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 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B9A7F5C6207; Thu, 26 Dec 2024 22:14:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1503EC4CED3; Thu, 26 Dec 2024 22:15:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735251303; bh=SeMHzC1M39t8q6CCCk8soRnhB4lB7Sy3qIRyk7EYfrE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fQElKYiZrPg10ZTDGDGyOYXrYb40QGFH1A9Y1Nu+H2xaepgLZrm/1KOAOPnpknTJM SmP9DEpnyiJ+XJFxdT2OadsMaV1fnfgO8i3WagP7Qr0nZpl3nn7xrUrhx9qlzPxeGr 1iltpyUwvAxgkY4reWZBID4op2SRkyO1WWlfWo2ZPYrLAFgoVFeIgkR6dbA5Fqr6Mj DgfSG3uP2K5EiMtRjSqSKmzOSubKrTR6wIVrFRfpneJTvThwlTFHlpEBX8HuwrmUPr zPCPzDUo18dVoUrPk3dcUE0DO3ub++l8qwhumfRJsKly23bi683QmfcyQDauxw5AXz HuVVFKKHEfaVA== 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 04/10] mm/damon/paddr: support damos_filter->pass Date: Thu, 26 Dec 2024 14:14:39 -0800 Message-Id: <20241226221445.78433-5-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241226221445.78433-1-sj@kernel.org> References: <20241226221445.78433-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 61AA740006 X-Stat-Signature: t7shf47ozwyfsb8ed7msi3km79ny573t X-Rspam-User: X-HE-Tag: 1735251258-156395 X-HE-Meta: U2FsdGVkX19lmo1GCiKRhq3yKGtkKZ7a1ydjD5ycCVKjQr87mLLv6IJDXpBhJUFEIrNuWggr1dqIiKLYPJ83FCRCfszwyBYYlWX6JXkho/PZLUqP5SAmJiq5ayPMctB3go0vnp4zx3tUf2p8iouREy4BcnxbUbq+q3vSrKYPb0tlUtk1XEDykRuCV4pNfWtgOyCjDrUWuqM//G6aUkAWAgktdFNvc1x9D2HBxVC/a1YdarlWFpnsJEgvWxv6XpLjPffg2QPBrgAUWBru+Wv1GZSmRuUs0NrXT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: 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(-)