Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp24487lqa; Fri, 26 Apr 2024 13:04:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVAR46TLq4Jn6eANGeIyFc3AhM8E4WA7hN9/kug1C/gYs1kIxn1dwNd22BZrJXq1vX5MxHSRSaFFoDyWUBkL8g3xyCv7TXJGVoLGf5k+g== X-Google-Smtp-Source: AGHT+IFZhAhaRv5aNOrocVJnK8FPE2RPjr9AKePrjKwVBscmFOQHS60r8nVenxEoIr2c2euhU2dg X-Received: by 2002:a05:6a00:17a4:b0:6ea:8793:6d64 with SMTP id s36-20020a056a0017a400b006ea87936d64mr4588215pfg.23.1714161880206; Fri, 26 Apr 2024 13:04:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714161880; cv=pass; d=google.com; s=arc-20160816; b=DrNRgvITlN0841Wt6/aHpRuCKNp50y3Ai3K1haHGismltb02SN5Lyog+I9oaKwcCsp 9dkDiEhCdP2CBCtaQFePipn9Yno+tnIi7DOSCDyEVaukEoYPWj4H7lNT7l4qdGfww2uq gBPNPjsPKvv8S/1kzF3jqC2BdQVuaNMblrwSsyrsO7AJGwHWSRheD88g6IGvMMqFQB9c 2EjPAhx36EURerh0iMLhku/DL1ku52ck0fvtBzEla3OcX4SRWn8ackzQDNR2bVSC3/yH 1o7SUAKGV+8My+W9Jzxyp+cWhA+q81Ml6tWJZKHwTPhKC8lcaNfg5pgs5W+n2ZQR8Gcr qGgA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=j74d4+BPbiRtnXrjIKS0sx1DHW3jEgfXZ70m7U5yXTM=; fh=+uPwm1v0kR9elkOH8LXzApiBs1O/622HeaqVouhIKmI=; b=WLV/0vQyld+jHHqwkk10cNieBMTJTq+Ia0cA8E5Rt2DBRZazi/Fg/6BcGdxBnvVvOk Si0y8EBq/FemTQfOg5hluhxu4LGFeZXGXbDdQv88747GLx3Y9O5v3tGjFjFS1mVlUtZn yYm/X2kWU9QDuOt34hTt/s95w3f6QcStL2H36ElP9vvBmMOZeoR1E1nCjMfKNgWjT7Fd V2x64Hby9zlCI517bOzPavM0CYhu7bp3/7mkNJOvq5wEBwLfumFaz/qlH3n/abSBB5tX 4mwD9YSeU8D9cyatbEic37XTACXpLT0PdaE4PydJG/0YOIrFTbm8/yKDboXeLnI8zCm4 oIvg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eLYNgvdE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-160637-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160637-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id v123-20020a626181000000b006e69ae8867fsi15398808pfb.194.2024.04.26.13.04.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 13:04:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160637-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eLYNgvdE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-160637-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160637-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A30F02886E1 for ; Fri, 26 Apr 2024 19:53:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB35F2C69B; Fri, 26 Apr 2024 19:53:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eLYNgvdE" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC3422577B; Fri, 26 Apr 2024 19:53:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714161183; cv=none; b=ten+jbFetPvi/pMvlusHwTYrwcpT98Q7PYcLCtRiBn4w5MCSZwsDd3RiS8WvWbmF5LRvlsBi9jLPHiXbDv63KJ5NxDGDGDDmNjoDGjX1CwWgvhdQ6rUZog/JCnPAB7BqqWU7W8yzovV4nVP+NhQUSlSInlGDgQOrMUZ28yFu0HM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714161183; c=relaxed/simple; bh=7DU4R9EMCr6vh5Iz6aftKnw6t4Q6vqj1u1UiBTV/q1o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kJa/C2k7f5iM1OPyxHmKVM7QAb2PNSzFqIVis/qzK0FlGxxdVcJ5C3qo0EpmCwNG0ozPlhHU1kXBkR0C7TWc9pmG0D/39O4Wnpgj08V4me4fMTUYlcgnk6ibcm7ogTznlJJG84KHoeXBJtQYIAWscSDZlsLVUtWc/6DCpL/bauY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eLYNgvdE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65BCEC32786; Fri, 26 Apr 2024 19:53:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714161182; bh=7DU4R9EMCr6vh5Iz6aftKnw6t4Q6vqj1u1UiBTV/q1o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eLYNgvdEpIUlrtvvzOSTquF5rJ5xcLuqkYJPZFObcmdIo933ByRPadsnhaF0urhMB YXynjowLyC6EWBNiJliRtGXw029dtrwOIwudD5yaPt4yNHLnmXqlD2DS5ggEWQTgqN rIQJYVPRkqgRVjpkkKGWniPqQTrUE8DeZesGCd6g/lF2VqnM4aOXomTQ3nVbj7zqkn rBZB1FjzeYMIbgMTBCVONBq+8wGBdUGzknY4oZRM5Ucu86v2w+Ho8KeAZlGuURO4pB 1vZNtX39au9u7qXJ97WSUfJnGkvy1iwJ8AlfyUQZzM9K+AbRij2G3wAzPxqfSLFBZD 3LUwJAuzP1l9A== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Honggyu Kim Subject: [PATCH 4/7] mm/damon/paddr: implement DAMOS filter type YOUNG Date: Fri, 26 Apr 2024 12:52:43 -0700 Message-Id: <20240426195247.100306-5-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240426195247.100306-1-sj@kernel.org> References: <20240426195247.100306-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DAMOS filter of type YOUNG is defined, but not yet implemented by any DAMON operations set. Add the implementation on 'paddr', the DAMON operations set for the physical address space. Signed-off-by: SeongJae Park Tested-by: Honggyu Kim --- mm/damon/paddr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index 310b803c62779..5685ba485097d 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c @@ -214,6 +214,11 @@ static bool __damos_pa_filter_out(struct damos_filter *filter, matched = filter->memcg_id == mem_cgroup_id(memcg); rcu_read_unlock(); break; + case DAMOS_FILTER_TYPE_YOUNG: + matched = damon_folio_young(folio); + if (matched) + damon_folio_mkold(folio); + break; default: break; } -- 2.39.2