Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp304512lqi; Wed, 6 Mar 2024 19:00:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXRrl1+o4fEN3nPanMXhyiSJhGU5CVOhHnKoindHEuhNfBK90akyrMnzgQpOqyutik8ggNteBW1mWbXwTOzfAd0MplmsiVos7fQbCRZ4w== X-Google-Smtp-Source: AGHT+IEoHQUvASZ1itLD6smcsAeP1tSZaec2hgzDXTK/Z9mBF8X+RMNWr30vVFwa7Jh6k+poPFkA X-Received: by 2002:a17:90a:f007:b0:29b:1c83:4e06 with SMTP id bt7-20020a17090af00700b0029b1c834e06mr14230399pjb.36.1709780428144; Wed, 06 Mar 2024 19:00:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709780428; cv=pass; d=google.com; s=arc-20160816; b=WctG8San9nbKJ6M6RJFAWbvjYn14x7iuJDqbhS/MBu4udKKJQtKq9k8XAXyVqdHvk+ IT6bqF/a8utp6Bi1E4aiPMaoO+5tnBZjWf+Yj6ZYQIOeIv3R+i9zBE2Evc3lCA4rlYOl wL9DIW/55YvBjSZOrT2W9nMvmtEywZQhlou/9rTCsQ9nf/Y30tSOiJDyGcH3TkeE/cKG e0RXSO4H5W2XXRPIv5DRrnXvJnyDtmtGpM6C9udDz+gYDYxyobup7k7lJgLumCuvlrgJ M/YX69LKfcGGW4HLkrT7wgXuHU/f4rcu4Q2WJM6YVX4ZEqJY+7wzqJFpyFutPEHpXX1p 9/Ng== 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=r5r7qrJjtIVjLMR0fRmsUwbbYodGkNXh3lv0AWtGVO0=; fh=eqAIFcD1itZH8YCcDK2SRUkGgYN7x3jlMaujj1UkxWs=; b=Kspw69QUFk+7j2DOVkF2C6UFjJKRaQ8YzibJ3nmlyztq8vJ28fbpsx26icHLBk55gE 1ZUIOpKoSDUwQO++t5pjIurHFrQfEJK8eVWTuIg2bo6zmNNeTEoA7jEdokXs5WMee8xM L5vJT1WHC4OT8Qo1I0zMNm4JYWt0vIIGUaHlHleWWeAFqsBf/ipKDIBKpgQ8bIEoLn9m 1nEaEq3hUrbIsSGmeUsYYAmfKs0l3NvjDrqPaQRRLHYYEy3F24Jd07W0GZqOa6+DunBm 5MPR+eUHVJ2dMk3rWLVBpmaWpmBCyBXUOaONtPaVzFl/zwvTutT8YSZTuE1lxsMD7OjP st/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MNWVZ5Ua; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-94895-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94895-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 pc18-20020a17090b3b9200b0029b0941fa43si820303pjb.127.2024.03.06.19.00.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 19:00:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-94895-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=MNWVZ5Ua; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-94895-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94895-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 C69BB28430F for ; Thu, 7 Mar 2024 03:00:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE6C363D0; Thu, 7 Mar 2024 03:00:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MNWVZ5Ua" 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 0912963C7; Thu, 7 Mar 2024 03:00:18 +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=1709780419; cv=none; b=iXrovgOTo2IpF8bEjfqQYdMS8/6QKuy1YSoj7y7YuHu3Gbav6rkKEHfwA/knSoeIYPkstMMNCoSB7MpskVBnOal02LtYbQcko4vSx0dCTMPb7PbVqc4XMX5ynDGJdMq48chU7uGnohBd+BfzyDG8KcZ+iDE4p3Mv8Tuw8wq+/gE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709780419; c=relaxed/simple; bh=SKDskSd9+RHTYzohWkfkmurFwjgubMDTQl6vfvCQs5Y=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=mwIqYeQO46KFpF5JC40IkN25AnHWXoWqQlKXZqDDsHsDypiVJXCpGNJr2q9Wp9t8/6Rnm2pr8eEgkoqPg5062QZv7rZ/PmlbRUd9pcR7exUtDA21gVAnSk8UDWNvgOr9JhiXdHkW7Jh+MFYV9ukzRpIFFdOeeNxJN7ZeQ45rX5c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MNWVZ5Ua; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0F5FC433C7; Thu, 7 Mar 2024 03:00:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709780418; bh=SKDskSd9+RHTYzohWkfkmurFwjgubMDTQl6vfvCQs5Y=; h=From:To:Cc:Subject:Date:From; b=MNWVZ5UaOouUV0GmS9soRfvZz7uEDLs0c9qjfpsMFIyYID5x1KTMaegxXZoOlRuZN trL7xfGG4vS3gFvPPGpX5x0J1DPYqJD1dwSLAG1fwqMiLpQ3RwG07ErEiT1rAm7aLj bVuuPMrbUwmZ2QMMBPt4yCvO6f+KrvKCqGLKMQ2aSxSsgh1LNw8qTIrSnnmXcRPY7C kepNZ50op2NzFicOAZOu2amTBgA3aOaqfsrKnLv590qXwZi/N8EL2CGVEnyNeVKhBs WwzOzZ0rou2lMvnV6+lOjnBAMlp6GvtIatIj7xYnydboCnleokcqV1SjqS3vbiaArH Gt22LHfxmGU4Q== From: SeongJae Park To: Cc: SeongJae Park , Andrew Morton , honggyu.kim@sk.com, hyeongtak.ji@sk.com, kernel_team@skhynix.com, damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/3] mm/damon: add a DAMOS filter type for page granularity access recheck Date: Wed, 6 Mar 2024 19:00:10 -0800 Message-Id: <20240307030013.47041-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 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 (3): mm/damon: add DAMOS filter type YOUNG mm/damon/paddr: implement damon_folio_young() mm/damon/paddr: support DAMOS filter type YOUNG include/linux/damon.h | 2 ++ mm/damon/paddr.c | 29 +++++++++++++++++++---------- mm/damon/sysfs-schemes.c | 1 + 3 files changed, 22 insertions(+), 10 deletions(-) base-commit: 78a854de1f605e99ccc20df1775f237120cca47c -- 2.39.2