Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp668298lql; Mon, 11 Mar 2024 13:46:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVI4IyfqwMTuhn2XxkOyyV690yYKcg+rAkrm7aMGK0QIXUS1G0KZL6hF3LMba6hpD6zq75bEp2kiSpMP2LiNKanbz/5idMcp55M5rJbHQ== X-Google-Smtp-Source: AGHT+IHbey3SoI8dO+IHV9r361R+QMjBRV7U3YY8WzlsS7CEz/U10HilqvfgLL18Ii7lGuNwT3ja X-Received: by 2002:a50:d558:0:b0:568:1444:a828 with SMTP id f24-20020a50d558000000b005681444a828mr3879375edj.37.1710189965844; Mon, 11 Mar 2024 13:46:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710189965; cv=pass; d=google.com; s=arc-20160816; b=cJi4P2g47OTTvC+i6o/DjCsGvk7YWeqa+dYj9jg0YoGuzEBxZRkE13wmjbwDcRZUwU 9seXxD0ndlOI2BP8oTCiHWNqNPwJTpTVVmttL5j1v4TCUnbO4f4yF+9a1L7bdkF7+V1s fk2yHNKxdJp9l+Q3vCxzjlj8TAlhU/7qlWp0m0//uruBhEtoshyXAAmFI0DzJ+xva0Y9 XoxobVsn/q1p63WkGgWRteE0ApdgA4fqRhUncb1NjGvdQItGEGK75ZFfNN2m5xH10Tbm HCBNv5sj2RJXYhcjUC8NnqILP8Tnek6yxVsWYGFzSyvBsgrs2holIF0asjJ+LluLOwz8 mH2A== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=Ohd60EqD/oDmNSHwQM+kf0gsDt/rdLF8ZhvRq5kGdfA=; fh=E/hPYPMZffwpMkqvbMzuoLlOj7U1fatLsderTFwZRHw=; b=cPSHEEHvxNwNA1xxc9agCQY4uucWZN9SXSNkB/drcz+FX4+xTsQJYa+Bx8E/g6WuVt 7YhGxteckpGR/EeKFLmB1VvceVeQkEuYbxbvZbZFa8yo8l5z4R6Ms1yi7XYslzjD6FyD B7/gNn5zflmVczkuxiIWeSlCN2aghlf97e4au89t9yhhgYYRkrKcxnjYRj6auNTw0Bwq GgSO3az9wETNstuxTve9HYGWwNTe61BjXm5CNH/TK6XEziTjaukcNtzKUKQwmuJBruMv 5L4Sq2eGCr/2iUMDqNJddNscYgs7Txc2o+b/dX3+fOYApggEgV+ycp3s11mNOsSTnbKn lUkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A6fUVGPl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99530-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99530-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ij11-20020a056402158b00b0056752f48f11si2799543edb.249.2024.03.11.13.46.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 13:46:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99530-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A6fUVGPl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99530-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99530-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6A8D41F21C93 for ; Mon, 11 Mar 2024 20:46:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A69944C6A; Mon, 11 Mar 2024 20:45:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="A6fUVGPl" 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 B0AD3ECC; Mon, 11 Mar 2024 20:45:57 +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=1710189957; cv=none; b=M4qczGomWE69gfz+DXNy90w4yP1px2loa1Dx7TOJpE8oHyMZg3TOYDM+ov+XM6ks/xyIlZRi6k5yrqEDTKMG5LkiCIHwajEA2KClABI9uDu6wJpf4uRq1a9TYKP1NGcud30eAx7YAhdQ/goPIo2EWzXapvJ0c6Cz4B5dXFKywYM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710189957; c=relaxed/simple; bh=s5xI8mQzAoMjxpwEaBaKlaL9MAdSZsz/UtdcP8IG03A=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=VZB1ZXVK8J74vDrLSEZO9MclH3BfFh5Z+MOqf+x3t4+FpZhhHrTCWxF6LwYqrNvafme8bDyt64I49nphFQ69qvueycdFjjflTfrwqUgfg+WjX0DdGG34m9JanDF2JeKBK59nmssuPnGTOS4R8Soy4enevljVMYL8wH5b+tvyWEM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=A6fUVGPl; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A78E1C43390; Mon, 11 Mar 2024 20:45:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710189957; bh=s5xI8mQzAoMjxpwEaBaKlaL9MAdSZsz/UtdcP8IG03A=; h=From:To:Cc:Subject:Date:From; b=A6fUVGPlk5NuPRlI/mnP1O/IxeWLCbg00NHinziLuI6WiVNTXi/0/KI2drBkdkUSv 9RfJ1iM7LmzejKD1R5IGpER9kAzambV0NRrW1TElkuDE1uT40NuKg69gC2IYzE+BX0 ivzDHEL7sMthf+yv4+MZXmOvVSTytptVmO+GZ4fc622uSwwFyZ7HgTA1YC0fmTJyJv MZQoP4byqHrGOMEpMOH2vP57quYbdZPjcWO2cEeaoQ6N181rs64ojbqVP4QNpHw6Cn vYDGRXvFYL6ibPnaFqbU9q36RnANPS1XGkC6EqfjEoyhTZUxmRKB3iMnKqyvTaaZYO GJfROvh/RhfSA== 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 0/4] mm/damon: add a DAMOS filter type for page granularity access recheck Date: Mon, 11 Mar 2024 13:45:41 -0700 Message-Id: <20240311204545.47097-1-sj@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Changes from RFC v1 (https://lore.kernel.org/r/20240307030013.47041-1-sj@kernel.org) - Rename __damon_pa_young() to damon_folio_young_one() - Mark the folio as old from the filter for the next check DAMON allows users to specify desired ranges of overhead and accuracy of the monitoring, and do its best effort to make most lightweight and accurate results. A recent discussion for tiered memory management support from DAMON[1] revealed that the best effort accuracy may not suffice in some use cases, while increasing the minimum accuracy can incur too high overhead. The discussion further concluded finding memory regions of specific access pattern via DAMON first, and then double checking the access of the region again in finer granularity could help increasing the accuracy while keeping the low overhead. Add a new type of DAMOS filter, namely YOUNG for such a case. Like anon and memcg, the type of filter is applied to each page of the memory region of DAMOS target memory region, and check if the page is accessed since the last check. Because this is a filter type that applied in page granularity, the support depends on DAMON operations set. Because there are expected usages of this filter for physical address space based DAMOS usage[1], implement the support for only DAMON operations set for the physical address space, paddr. [1] https://lore.kernel.org/r/20240227235121.153277-1-sj@kernel.org SeongJae Park (4): mm/damon/paddr: implement damon_folio_young() mm/damon/paddr: implement damon_folio_mkold() mm/damon: add DAMOS filter type YOUNG mm/damon/paddr: support DAMOS filter type YOUNG include/linux/damon.h | 2 ++ mm/damon/paddr.c | 64 +++++++++++++++++++++++++--------------- mm/damon/sysfs-schemes.c | 1 + 3 files changed, 43 insertions(+), 24 deletions(-) base-commit: 13043cde46a19e72d37965b67b74e564623f65e7 -- 2.39.2