Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp668584lql; Mon, 11 Mar 2024 13:46:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVDpxnFP6raIe16hFUgYKoVKIHNZ49JF9kU3qTSNCt9vAcnZYaFK8vMo1gIbFi/aSZX+/kti9eUjmJN5uIpeCIpjlIArEBGdh+TBmBIxg== X-Google-Smtp-Source: AGHT+IF9tBz5A1Lqg1390Yc4f95MoKXlwLMrls/5fCcR2ccwujNCRp8ZC/9wVxuASpHXFfni9oHf X-Received: by 2002:a05:6a20:c409:b0:1a1:4971:b682 with SMTP id en9-20020a056a20c40900b001a14971b682mr6320092pzb.61.1710190006221; Mon, 11 Mar 2024 13:46:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710190006; cv=pass; d=google.com; s=arc-20160816; b=zAAbAUZGQ9YkyVpsNdhV6rolrjVVdW1hGC7GKQFFU5Grzhnwb6fRuZT4Gw5A3id4LD Fb0U4hOofvVZedrwOp2boFRRX1UtnBVsbmVoIjxaJJPVM1IUUEayI4EJW7bP7/f2Iy9o 5ephIWpE1kYtDlmhZVMoL0iidH0sijnGL6QRBWhLSoPzeNzCgt3Q24dM/dzsS4jDDyY3 rYKWKDnyEUx7jnlGSl60L9FmcIppAhEoyr5vhnAb/UfxUPodN7akAj81o0GenEQI/ftH hZJkuyOMzdscwqYNIvkkfe+P3cGskGYKGvkiFBtsfEMAcGsgpmxmAdTIZolv9Ih0rtTx 3v6w== 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=PVxYXcPwHuDlvucLJAUIYq1iY2f3LRUkqxwYC+Y1obA=; fh=E/hPYPMZffwpMkqvbMzuoLlOj7U1fatLsderTFwZRHw=; b=OZh6YG6VY7HBhYbeWRyG22TEYzLfCfE4uEvoEfenDIDB+dBy4HWPFqLLas2wWP6VUJ XcTeiVaWqVp2V7GH6yoSuXzpHXAm7GU0Xg1n0CqRXGGLMOZrXZDyCtyFRFJikITBR6/a RUf1Vk2UJUI+3Wm59a4B6LfKjQ7DXxwHwtXNPBP1BXI3zo/TLCUdM4gHM84W0XKZng34 ac9GEMtx9imNPj5JUsDIj2MP1p/hEe7JDu7ahKTgV2Zg6PeQNPnJIXWWcz3gyCUohSIe DP5rWWJ4Cp46VqUN41ogyx/bOZLP345FMLHrQISagK6p5E2yvg9r1YaRv+SglngD2RJ/ O9EA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eLvgqV3r; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99534-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99534-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s15-20020a17090302cf00b001dbc739f470si5686861plk.480.2024.03.11.13.46.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 13:46:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99534-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eLvgqV3r; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99534-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99534-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 A99662820D3 for ; Mon, 11 Mar 2024 20:46:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5413F5787A; Mon, 11 Mar 2024 20:46:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eLvgqV3r" 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 7869857305; Mon, 11 Mar 2024 20:46:00 +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=1710189960; cv=none; b=a3FFgCxhLRHbhr6no7edlMVjcZBohrLYtJJ8SIYu03JeCRbGVLOsJj1yZ+XTgSSFVqqyzmHlmoykWTvEdbXPD+iL5B8dLBSN9lrzY7rGKMqCase4ndxd9c0NdAsDClJBXIMbxs4tfSu7r0RyIsSSV9sAZpMqOSaRXgT2Ai4svzY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710189960; c=relaxed/simple; bh=fHultMqP8gCokferFy6tApU0Sk9aroAt2aHpbSo1nsk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jkd64PwwW+wpf3el5XNRsJaAXOAfhBX/VcffsjH/R/39Bt6stxz92suESXVSjVkOSlGSyVacLikM9v0IMlThrSuj4Zr//3xKwl11J5yYvBmdVG9/DmRte+BECdw4mOA4dVJViTImUxQaM1DBkNCMDIbDRBN0L5nZwer9HxVRLkY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eLvgqV3r; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99101C43394; Mon, 11 Mar 2024 20:45:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710189960; bh=fHultMqP8gCokferFy6tApU0Sk9aroAt2aHpbSo1nsk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eLvgqV3r4YMJlZJBEZKjbrWC6om6P7NHp4+td02wctGQ4N3G4z7GE9qAALIugj8Iy zWuhVw5VPeN5BFBkHQEw2DqnN9PJ8PzP12e7TgKpaglJp5zBNDZGXDv0WhHOd6AiRG /tdhcB0X496jLKbXT1XXDe73H+lrmBfWEKaG3wQHATYab+otN2mFbzqlxdkLmPpyYe PDN2igIJSFeMWgbraZ1APtggzK2pUeRE4QCsdt2fkTarI6TL0DSCzH7KXThT1wdML0 33+Xqm19q6A4lZlgFZz3iU0cMUq8GpK9WvSuWLa3H2gk9OADSIsLpAPWfvMuTED53D lfVd5ZjQ1OwWg== From: SeongJae Park To: Cc: honggyu.kim@sk.com, hyeongtak.ji@sk.com, kernel_team@skhynix.com, SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v2 4/4] mm/damon/paddr: support DAMOS filter type YOUNG Date: Mon, 11 Mar 2024 13:45:45 -0700 Message-Id: <20240311204545.47097-5-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240311204545.47097-1-sj@kernel.org> References: <20240311204545.47097-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 to the DAMON operations set for the physical address space, paddr. Signed-off-by: SeongJae Park --- mm/damon/paddr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index 310b803c6277..5685ba485097 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