Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1854011lqe; Tue, 9 Apr 2024 02:19:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUi5dj1gkdY56lqW1+ql+vIredbg1yEEdBGWbL6X3RdRxmxc49WSbMBX06wxgh5A6bM8SZFdKvxvP/BHIKQbgrWazd+VvSgP/hKFtkpIA== X-Google-Smtp-Source: AGHT+IEJ5o+vxpLUDph3+4Qf+QbdW0PpeMMjzjdUFZzL/8xnZu/5zoHMpigReuak+BaCBVaVlaEt X-Received: by 2002:a05:622a:207:b0:434:e7b1:3589 with SMTP id b7-20020a05622a020700b00434e7b13589mr454298qtx.67.1712654391051; Tue, 09 Apr 2024 02:19:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712654391; cv=pass; d=google.com; s=arc-20160816; b=eel5cT2aLWd9CrPpEo/YksHoNZSkPadypfw+7CBAxQ60x/oB0tKg31Zkfp6yYZZ7jR nYExsOA0SkQaB3JZGCIYKlqKbMCtP2POGhHEl8cvWUtAOT0uVDAwySQh9ec79sGqGufh Bf83cIqFjtSFOCsCOzjGHTyttG5NVk98l/KJfV2Re0BjpYP8ecCZYy3qpuK43EeIx2gy cxHynv+VqGG3HBvR0HaN7P+cVUfNDVpimMVHSZDGb+HvvYsbtMowUHrJZbPsGrgtkhJr UfC7TRj7JuimVRZG+0kBTpcaDnUJ8kc0yon8t63DFQEdxL8fwCOW/qpOcmR5WWAbCXJU UvTg== 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; bh=x2zQRnijqWIlvHrbD91x35hLc4r+aZn3XU4n4wfFFaQ=; fh=yGVrX/pB9l9bYYwv/ZJjvdspUkD32AYIyCW2oKXieCY=; b=lGTCis8HNrvdBMwjKeu56c09qQ78HyRwKbl9uMHNa7QcrvBiNFecqcTvoB6qTgGIhB huyp8sEh4YfaJGaCAKfS8tT/Su3TLIvAFdw0P2+jeIUb9G4YykoeG5vEVewRuFdxIALx xyKiDekxoGcEKb4OeuOwoeyqc+MubYDXyLZOj4RiIZo09Uv2LmYfdZJB5z01terDYrHi mwV1k/ne8JShFJbZmuwmAkSkl0nKjI03/jnlW8ZhQVgjbgZ9kt49qsgmQQ+ZJVwG8KWE jqHll1SpFnkJUZOMx11JEATF7Lqwn7XeL2vSJTewn+lCvNHARQt17oHQDeKNDr6tL/lM 8oIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-136535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136535-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 5-20020ac85705000000b004348a3587c0si4701389qtw.474.2024.04.09.02.19.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 02:19:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-136535-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136535-linux.lists.archive=gmail.com@vger.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C4E5B1C21938 for ; Tue, 9 Apr 2024 09:19:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C9BB17F48A; Tue, 9 Apr 2024 09:19:45 +0000 (UTC) Received: from invmail4.hynix.com (exvmail4.skhynix.com [166.125.252.92]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8903B7E792 for ; Tue, 9 Apr 2024 09:19:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=166.125.252.92 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712654385; cv=none; b=JKZOkTBVjBSZZdFw/V6RkCCecnrCMg+TtZvR9GnZxwgwzHuX4wjJ94HxnnWpD4q+v3dISDEDSN09G8ymzgm4QrIvLzKLRuAmqZJ8oEtOWN2uL8W3PCBV40/nmkpXEJeVs9dGYVRCgqwTouS987g1Hl4kDT7KnaEp/4A0EZGjK7s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712654385; c=relaxed/simple; bh=+QH8pQ8pxmAzwSQ6qHfXOk91jAy/6zzv7tELaUaMvE0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kqri8oAdPK+ZP2XBuuwoS1F55loUr7dpxw/7szTXdcr4CZ+YwdjiQ+yMSyYd3bfuxYM8WQNmUuqEdYovs0xgaByqOgxCPrPHF997Wz+xW53QlCSFRlMthqUc9Wjw++1TxF1wa5OWgCBTeXY0y4l93+dqUDS3PSR7qhoXlQGEaIw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com; spf=pass smtp.mailfrom=sk.com; arc=none smtp.client-ip=166.125.252.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sk.com X-AuditID: a67dfc5b-d6dff70000001748-25-6615082a1610 From: Honggyu Kim To: SeongJae Park Cc: 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: Date: Tue, 9 Apr 2024 18:18:09 +0900 Message-ID: <20240409091812.3003-1-honggyu.kim@sk.com> X-Mailer: git-send-email 2.43.0.windows.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprMLMWRmVeSWpSXmKPExsXC9ZZnoa4Wh2iawdlflhZP/v9mtbi8aw6b xb01/1ktDn99w+TA4rFpVSebx6ZPk9g9XmyeyejxeZNcAEsUl01Kak5mWWqRvl0CV8biqV8Y C44JV6w/WNzA+Iu/i5GDQ0LARGLpjtwuRk4w8/Llr2wgNpuAmsSVl5OYQGwRAUWJc48vsnYx cnEwC0xnlNh4YjMrSEJYgFNiU/d5dhCbRUBVYsHjjWA2r4CZxNv2g+wQQzUlHm//CRUXlDg5 8wkLiM0sIC/RvHU2M8hQCYGvrBJLl06HapCUOLjiBssERt5ZSHpmIelZwMi0ilEoM68sNzEz x0QvozIvs0IvOT93EyMwqJbV/onewfjpQvAhRgEORiUeXourwmlCrIllxZW5hxglOJiVRHiD TQXThHhTEiurUovy44tKc1KLDzFKc7AoifMafStPERJITyxJzU5NLUgtgskycXBKNTDqWnD5 /FVb/SBf/ND211Nkr7+ZXuLv7303r449s82OtcDp7keGCsX85cnb79zZeP624oXr7f++705a 1i1uEShluzLvyALGJBF+g65fX+MC1EU35Rzh6ghOeMW079rJNZJsVQukYt0i9qTyn4xNizvg 4L/jw60nK0K2Hrx3bc5+2Xu9pXsPSNsosRRnJBpqMRcVJwIA7V/FaiYCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkluLIzCtJLcpLzFFi42LhmqGlp6vFIZpm8Ou/nsWT/79ZLT4/e81s 0fnkO6PF4bknWS0u75rDZnFvzX9Wi8Nf3zA5sHtsWtXJ5rHp0yR2jxebZzJ6fLvt4bH4xQcm j8+b5ALYorhsUlJzMstSi/TtErgyFk/9wlhwTLhi/cHiBsZf/F2MnBwSAiYSly9/ZQOx2QTU JK68nMQEYosIKEqce3yRtYuRi4NZYDqjxMYTm1lBEsICnBKbus+zg9gsAqoSCx5vBLN5Bcwk 3rYfZIcYqinxePtPqLigxMmZT1hAbGYBeYnmrbOZJzByzUKSmoUktYCRaRWjSGZeWW5iZo6p XnF2RmVeZoVecn7uJkZgAC2r/TNxB+OXy+6HGAU4GJV4eB3uCKcJsSaWFVfmHmKU4GBWEuEN NhVME+JNSaysSi3Kjy8qzUktPsQozcGiJM7rFZ6aICSQnliSmp2aWpBaBJNl4uCUamDcX7Op iD30Q93GCaJXp7I0pTNXN3D4Ru0SN/V9/bTdZZ/sn68+evdj/3/W/t8qpPv73UP+A8rtjxYv 8J6TfkS+b7nu9cmSD32tg89bZ29kSZ3Ycrbeiv3e+WnXDk47FZO/ssg4ZyV3vEWEmGw3t+m8 9x8jGKa8Oaw/Z/fTiKwXkQbcZ4/POzdLiaU4I9FQi7moOBEAhApk3RwCAAA= X-CFilter-Loop: Reflected Subject: Re: [RFC PATCH v2 0/4] mm/damon: add a DAMOS filter type for page granularity access recheck In-Reply-To: <20240311204545.47097-1-sj@kernel.org> Hi SeongJae, On Mon, 11 Mar 2024 13:45:41 -0700 SeongJae Park wrote: > 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 I have tested your patches for evaluation of [1] and it all works fine. Thanks very much for doing this work! Tested-by: Honggyu Kim [1] https://lore.kernel.org/damon/20240405060858.2818-1-honggyu.kim@sk.com > 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 >