From patchwork Fri Apr 26 19:52:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13645324 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A509C4345F for ; Fri, 26 Apr 2024 19:53:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 79FD46B0089; Fri, 26 Apr 2024 15:53:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7290B6B0092; Fri, 26 Apr 2024 15:53:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5F0A86B0093; Fri, 26 Apr 2024 15:53:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 3F0FF6B0089 for ; Fri, 26 Apr 2024 15:53:04 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id A7577C0420 for ; Fri, 26 Apr 2024 19:53:03 +0000 (UTC) X-FDA: 82052731446.02.EC2AC81 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf16.hostedemail.com (Postfix) with ESMTP id 0E76F180006 for ; Fri, 26 Apr 2024 19:53:01 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NuBZFNFW; spf=pass (imf16.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714161182; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=sUGoYN0Fu2JwJJUX4qzPlBqkcVYVJWabggt2RjrpG48=; b=ynMioeDupgfBG36y5fMvYOZg2efjmRRFsqQ6/mzk3O3wNIlR/tgLU4SxIOQjQLfitRLfjS JOSvcYFbfxvJIO9vApi6rETsyzy9NNtvAUauqIs+ys8Sj+IM/cTvDH/A+6aAucLNuYBE7w CjhjaEoJBsKPR7bdeKzFKgRqQJYdfsc= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NuBZFNFW; spf=pass (imf16.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714161182; a=rsa-sha256; cv=none; b=Pd5ahaKLCcQuZZ4CcYyZqWx9LKHHTwINuj55KqKw4/TLeOMd+RYeR6Ttg0uVuU0yQNrnX1 s4F6EZwWR1/hwIZRMEEVF+zDGfL5Z5xfYBzMZEEVArEpIsPWqj/x+xd/ckDjLly7xeV9zj R4U/7FLtH2WOoC4LyCA2MDt7MCXIw/c= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 26F2D6212A; Fri, 26 Apr 2024 19:53:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4EF07C2BD10; Fri, 26 Apr 2024 19:53:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714161180; bh=q0ougyw7Umb7GSxVQouuuoREw7O7beWYRZUPMMfuCtA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NuBZFNFW+n7ysMXFK5xQPz08L8HRsd3vbiGBevHLvdhLazTjRtvHpHpeZTEURwoY6 SIKHqPQbzTtOt5nTuqBxLnRdn2+xnW6Sq5Ehcg9D/xOP10v4Uw2VklESDv5RS5kWLK kCdl7iIr1QMfKYlwBMCTiQISFW7CiIBG0jddZemWXJNNTm9HROiQxlqWr6DvdqefiG gvxDL9uuYv4JeU398CZUPWMGostf6585yV9p1rNjCGF4Jeo6Bo7zHe/KZNW8HbrmOd j/jnPzerkABscsKz8LT5yYfJFhEfikGBob9CzFCIJLZY6utDk+rDtETC8OAoshJzCE SZ8jSW88XABLw== 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 1/7] mm/damon/paddr: implement damon_folio_young() Date: Fri, 26 Apr 2024 12:52:40 -0700 Message-Id: <20240426195247.100306-2-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> MIME-Version: 1.0 X-Stat-Signature: n5accesc4gwyrf3ror4w6bch5yxdzwaf X-Rspamd-Queue-Id: 0E76F180006 X-Rspamd-Server: rspam10 X-Rspam-User: X-HE-Tag: 1714161181-331449 X-HE-Meta: U2FsdGVkX19Vro1fU7dvsnSMR05kRT1cFXnaCYMQLMQH/wAa6M8QEljOszGC0Kf4ew44t8lf4pRTE58N5vlL5rKICSjju5ErXbhUWOkj6K5JSwiQz8/O1hfejYFXWaukEhrRhFzlE5Hj/04XsGJsYgRP3HeJjl4WHkLivyeyvkQmqExa604eA4qSntLW48yNye0Dn+Ah6X0uf88d9Yulzp3cc1r5aAbunm9s/91wOOzgQJtU0SM6Zbr4ySqhfTQjqZyRYWCbG6Yn0DjvGap8EpF7zWSswopYe7VFOHm+gUJYIwhZ6UhNgFguSGayk8WFvI3pCFsTYUXo9D7+g18+YbLKp/RgTwAbx/qUlfEe46I7G+cO0R0gNFeuS88dO+htYOIY0qsO2/h7YFAFwgIy0O6tYjCkjW/vPcL8myRlTI9xcN7XS/U2w7Hm4rK3wb/+yXwqi/Cg8eK/ChahMfsDEDckgHQTy7swzPJckl+zBLMS/oHZWGT1V5aRXIXBcv+nkguzEyC+UrJRlu6LZLDxl+pZAIF5Ec9FLIBP5WPZihQdlvul/qiXjSj4xlW4bK3hnE4QSbcjRi0PApdgzKVCDkF+xnytc3wRn5H5QEwngKBfAnBk9ZoFPfYZE+1KwD8apLD9oht/aO2E6WaUIGQSDLWDkT487yQGdlV5Kbdpa3z1Raaj8bDMcrOq5YtGkx9ngZQYf3NIzGgoqFPuGb0pxuatPHn66cq1jNySkwOPAT4nb2lsMG4cP2RSHaR6FJMnqma3vUt685ZCPm8wIv45cZ7CH0Kr+IO3Pw6dprwfI7UPOuq3czjARD2RFSeH6rsYTQKh5cx4CEAQYy1OELVIL3dnEj3jJB98gE8xMw0Mv4ep6+kBBVqycJNtg/jyX4S+YWtRbT8BTh1Pc3u3/snkjytw8TPwFHJcELOYZoSJD+YhAVvrt0cXWoD3QlAqC05/Hr6GsBBKqUge/NaDDRI DI+pWXR2 w+kUYawj6yjh38SPLuGvfH/gFyo3Kz0zGSC0Hny+kmKAsSGrtWMP5Zj/nkpGXdSZ84Gb5z35UhlXFkwlKvBS73Re8YbYR8HhxI0gHKnoAuIJebfUyN4GcTVGlbeQavweLyhRuw51upnrz1Hnercetu5bbIPWc+jlauzUfFTlpAcxW19A0HzsaqllcRfjKHWzAW36DM3keKy7isE+uShJU3mQIo3FypvXbn5532uPwDVw/y2Iv0AuT29YkZ0tHQCkA60kmL3IE8I2tggbBBtoWlJ7TgvNQ7rSx73ko6WGnzoSUA38e5KKHmMPh7+IqrPRJxS0DHasENz+1gE5eP8252/Dn4g== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: damon_pa_young() receives physical address, get the folio covering the address, and show if the folio is accessed since the last check. A following commit will reuse the internal logic for checking access to a given folio. To avoid duplication of the code, split the internal logic. Also, change the rmap walker function's name from __damon_pa_young() to damon_folio_young_one(), following the change of the caller's name and the naming rule that more commonly used by other rmap walkers. Signed-off-by: SeongJae Park Tested-by: Honggyu Kim --- mm/damon/paddr.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index 5e6dc312072cd..25c3ba2a9eaf4 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c @@ -79,8 +79,8 @@ static void damon_pa_prepare_access_checks(struct damon_ctx *ctx) } } -static bool __damon_pa_young(struct folio *folio, struct vm_area_struct *vma, - unsigned long addr, void *arg) +static bool damon_folio_young_one(struct folio *folio, + struct vm_area_struct *vma, unsigned long addr, void *arg) { bool *accessed = arg; DEFINE_FOLIO_VMA_WALK(pvmw, folio, vma, addr, 0); @@ -111,38 +111,44 @@ static bool __damon_pa_young(struct folio *folio, struct vm_area_struct *vma, return *accessed == false; } -static bool damon_pa_young(unsigned long paddr, unsigned long *folio_sz) +static bool damon_folio_young(struct folio *folio) { - struct folio *folio = damon_get_folio(PHYS_PFN(paddr)); bool accessed = false; struct rmap_walk_control rwc = { .arg = &accessed, - .rmap_one = __damon_pa_young, + .rmap_one = damon_folio_young_one, .anon_lock = folio_lock_anon_vma_read, }; bool need_lock; - if (!folio) - return false; - if (!folio_mapped(folio) || !folio_raw_mapping(folio)) { if (folio_test_idle(folio)) - accessed = false; + return false; else - accessed = true; - goto out; + return true; } need_lock = !folio_test_anon(folio) || folio_test_ksm(folio); if (need_lock && !folio_trylock(folio)) - goto out; + return false; rmap_walk(folio, &rwc); if (need_lock) folio_unlock(folio); -out: + return accessed; +} + +static bool damon_pa_young(unsigned long paddr, unsigned long *folio_sz) +{ + struct folio *folio = damon_get_folio(PHYS_PFN(paddr)); + bool accessed; + + if (!folio) + return false; + + accessed = damon_folio_young(folio); *folio_sz = folio_size(folio); folio_put(folio); return accessed; From patchwork Fri Apr 26 19:52:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13645325 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49065C04FFE for ; Fri, 26 Apr 2024 19:53:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C81DB6B0092; Fri, 26 Apr 2024 15:53:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BECEA6B0093; Fri, 26 Apr 2024 15:53:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A5D536B0095; Fri, 26 Apr 2024 15:53:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 769596B0093 for ; Fri, 26 Apr 2024 15:53:04 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 385DCA08C8 for ; Fri, 26 Apr 2024 19:53:04 +0000 (UTC) X-FDA: 82052731488.24.0425BCB Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf28.hostedemail.com (Postfix) with ESMTP id 93DF5C001D for ; Fri, 26 Apr 2024 19:53:02 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Q2nYt7mW; spf=pass (imf28.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714161182; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=bmBGpD4FzLpxb6o4z/r1N7rmnUy5h4Pe+Fu+Xju4DGc=; b=F4I0fVSX36/P+ij4D0OXwyifm8XgtzCAx9bXX1s3DCl1XuIjPXvcNAv4sgV54IVruvn5ZI Dvite59G6KxEiwohgCr7JzVN1CHrxPGB6eC5MOPHd7HqmVK+FYduKYU4ukCgUiL/pg66zc KGM0r8Mz4Z3a0PDp3awPpArSSD9oVis= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Q2nYt7mW; spf=pass (imf28.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714161182; a=rsa-sha256; cv=none; b=5MWla1nWJm/aqBQ/QLT/sl3zLrV0jhYHzMONoRNvTxOahFpdKRobDckHW8GF9Oaz5Ct+Qy O59wnGhY22ao4L2OoVGJQs+DclWpbWsh4qyF1ZtlGiIu3eYhPElVzl8NExd2u4dNUF9bhZ yF/h7geukTpmLgZ7u98FAcLn6kobbZo= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B62CF62134; Fri, 26 Apr 2024 19:53:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09FFEC32783; Fri, 26 Apr 2024 19:53:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714161181; bh=2SdOrYSwPaCcW6lpCEqRPan9kbnzKrEsfc9vQDQS2P4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q2nYt7mWd13qgtKTEmdZ8bbPoMfYI4/cOsKLqW337FVMFVnXLzHas4Q3U7I8sR9Z9 acTnbyUuez7gsIQG1uH7YW6DXA+S5rVfeQ0tGBhTrPDECy5NqITSc0RYvKJiY1Sv2C CZUHHD8wpa421gUwEDHr6tOiBdbKORfwX5bL5imLi41RJ28KPLcRXdkDMfa1lROS64 gl2TbHvNv0P4Kq5NxFRbFiWfbHqm290wByZkMtJ7kN3GDgDsoIiQCf4ozaCuxsRysr YFNOXfG/yUIi63M0aNql8e5LePHrLd+73bb0cs3r9r1pkB6A6DeYp8JyfcYSDlUJjW e78umN2Oi8T7A== 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 2/7] mm/damon/paddr: implement damon_folio_mkold() Date: Fri, 26 Apr 2024 12:52:41 -0700 Message-Id: <20240426195247.100306-3-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> MIME-Version: 1.0 X-Stat-Signature: qn7f69bom54pd551rzody98ixfbstri4 X-Rspam-User: X-Rspamd-Queue-Id: 93DF5C001D X-Rspamd-Server: rspam05 X-HE-Tag: 1714161182-930004 X-HE-Meta: U2FsdGVkX19BkMXrpmklYBMo526J0RjkaGHhtuG8dMTAdQGRYGQaER2Wn336Bky/CRH8gQQZ14x3d/zldisYM6mnFppckyXNqJ3TsXa4vSIa5sRuis8COQ2YEqess8Xi4HFEsg8W7f4gxVrzFZb89CVNDVP2DMT85Yu715XHFRbezfaqpBY2x23xXZBky34tIxTdlRQE6M10GsILRfIAYIpuHvf9hagtZnWHDdHRlESwu6HA3C5/woJhG/Dzd/l1U/SFTSFCQ2Anqd1hT1RepVeZFm4LVZWBHT393o/qcbOcOhyjeRqYV8A+6QRDmeB1WeS6jUQ4mjU5zd+wHQKq6GNbKcl9yC814/Wtd7C1uxAuTvYTHt2CBhjF6J0Z5sWRR0o2AtZJv7YKURoc6YyEtANP1ZbYy0H68q5sFeKRA1RBhcXE43BXrYbo1wGjEFmK3qGokcyG4+QNzJSUe2kdg7C67u8OK2wIc4P9tF7sCMpZO1VCIoLy+i2IlTbvi7EuzmZyZJYDWFRxskyUhLPPr2xt6NqQyBCw0jdGfUCwkQsHd17xaUwY178XtfcF0R4+/IAWjb3nQXqzI3zJ7n+/iDzky2/qfkANAd5ZmkYru1ZDRKgXAncm+34SrmFF4P3QFIxONMNQ9RCFoGSFycXyW4RtjpNEdW/qKbFAYKZYbRn/D3G6Q+0WWk4QjWT5yueX1uqdbbCGPt3tmE+WXgeLHX9RUR/nRj3ugVBss8cS+6jp7P0YR79FfBXFeqBkxKFGbfwyojcIinAu4B4h8ovnH6UuIAnwpUNtIZAWWboUgPDYRBZ1OfhJVOqN3eM2W7dMw4lWqKKUv4bzYDk6NZkK6g7E4TVrk5WnrNjUjicNpnWuEX1LlT/eLxhdXjobjIab0lS5ZKSXQJKdeSGtqZaCg8Oq7ttsZilHahs7IGtH+mZzOb/tP9BTwm3VFmqWISKq2p/1pq6GhLdw2KwXTES ARxfg99q zGPnYV/iVlaxCW6TZaqRR74grgOFA3e/cb275SW1gPMoSFF650H9w6dP20j3kiatv4utzY8mSVJCUhNkse9l1AtuCLxaP/EjRPfqiSyXyaF4JsZ0KsKI+2LHqCt5zdZ0e98B130cfbk5VZiT8PvUCcr8Q/qNNfuckN/Vu/ya/Q3wxzBR9Mn1TZfLgWivUfM149RPM+WP9WpdSBkLy0/5OoDi3bvnmRmQGDjW4ZXL1nMsE/dcV/We3TvhLQ//YpJMOvyK39Rl7hkFl+72VX72x9tKA/IwNrnY7o9eUaQg2IrXnHonh7P65yE8NkWecy6pUxLP4p65D2LixYBvOcNrS5TcZeQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: damon_pa_mkold() receives physical address, get the folio covering the address, and makes the folio as old. A following commit will reuse the internal logic for marking a given folio as old. To avoid duplication of the code, split the internal logic. Also, change the rmap walker function's name from __damon_pa_mkold() to damon_folio_mkold_one(), following the change of the caller's name and the naming rule that more commonly used by other rmap walkers. Signed-off-by: SeongJae Park Tested-by: Honggyu Kim --- mm/damon/paddr.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index 25c3ba2a9eaf4..310b803c62779 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c @@ -16,8 +16,8 @@ #include "../internal.h" #include "ops-common.h" -static bool __damon_pa_mkold(struct folio *folio, struct vm_area_struct *vma, - unsigned long addr, void *arg) +static bool damon_folio_mkold_one(struct folio *folio, + struct vm_area_struct *vma, unsigned long addr, void *arg) { DEFINE_FOLIO_VMA_WALK(pvmw, folio, vma, addr, 0); @@ -31,33 +31,38 @@ static bool __damon_pa_mkold(struct folio *folio, struct vm_area_struct *vma, return true; } -static void damon_pa_mkold(unsigned long paddr) +static void damon_folio_mkold(struct folio *folio) { - struct folio *folio = damon_get_folio(PHYS_PFN(paddr)); struct rmap_walk_control rwc = { - .rmap_one = __damon_pa_mkold, + .rmap_one = damon_folio_mkold_one, .anon_lock = folio_lock_anon_vma_read, }; bool need_lock; - if (!folio) - return; - if (!folio_mapped(folio) || !folio_raw_mapping(folio)) { folio_set_idle(folio); - goto out; + return; } need_lock = !folio_test_anon(folio) || folio_test_ksm(folio); if (need_lock && !folio_trylock(folio)) - goto out; + return; rmap_walk(folio, &rwc); if (need_lock) folio_unlock(folio); -out: +} + +static void damon_pa_mkold(unsigned long paddr) +{ + struct folio *folio = damon_get_folio(PHYS_PFN(paddr)); + + if (!folio) + return; + + damon_folio_mkold(folio); folio_put(folio); } From patchwork Fri Apr 26 19:52:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13645328 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC8C8C4345F for ; Fri, 26 Apr 2024 19:53:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 641B36B0099; Fri, 26 Apr 2024 15:53:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 557726B009A; Fri, 26 Apr 2024 15:53:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3F7966B009B; Fri, 26 Apr 2024 15:53:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 1E8B66B0099 for ; Fri, 26 Apr 2024 15:53:08 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 9D80FA08C8 for ; Fri, 26 Apr 2024 19:53:07 +0000 (UTC) X-FDA: 82052731614.24.EDCAB74 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf20.hostedemail.com (Postfix) with ESMTP id 9739E1C0005 for ; Fri, 26 Apr 2024 19:53:05 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=RHJRU25s; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf20.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714161186; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Ax0ak193mfRPLEDaHOaEMRjbpwwWvp6smyg8+qCmr/A=; b=UZMDiWbkui69PUTinHUYJQA1A5RDsbiuE79P+b21wa46x+wC35IMWKT71wCXTrdmysZCdQ Ri5LyWQBGOTU63KmwIMzF1LvkWPUgwjk7BNOz7meI0d7kmiJKtGnctALmlAxYl1+IzHzw8 ICUpNnb93Qsg4U0RMVnkGvwO9WR++cA= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=RHJRU25s; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf20.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714161186; a=rsa-sha256; cv=none; b=dev/vC8HqFjxaJyZ3RdDfi/U6QsuruHyz6kDm2cUc7OJY4d3O7OfqAgDOUF9XPfjlM0C6A anYKRY7KCkNxI5AXKoUf2gwKVsWv7+IWLSwezpR7N4zCdOUmlopfnFoLuv1TItklA69Szl YvYBBm7T7H7nHoxzNxmIZyYXpDP+7+o= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 08100CE1D0E; Fri, 26 Apr 2024 19:53:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA417C32782; Fri, 26 Apr 2024 19:53:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714161182; bh=46Ldc4399x5vGxfdUW5g3TDQSnO265hzzOnyBh65g88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RHJRU25sNcZ3kflmc9l32q9W9O5dkcFuYIFx4htbsFTTzuLcIKoq9OYjbHSgGAoxN wBr7lR9mubXiLcmQPxKdxlvdKtYeIYiPQ7w48zCP0wR2rlG9ASPxuxwMIucHe+55b+ PwKyiWbJnIBFXfDxrmCkwgTTKrd1pSIv/QPS29wLCzkg20hJXH6VeSafdXfQ7AD30s rAEh9hr00Eso94b+xhsEI0G0OE8QVQmM59lL2AvNN9bdQJlGnTWcKsVnLcWnbjGBpA SmA35yWD0jqw4y4ByPWOtykdRf1ZPqrAfDlIs3DlgjtwHhAVkseI7H82QAVJ9/txXc y0gQttRPRGmbw== 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 3/7] mm/damon: add DAMOS filter type YOUNG Date: Fri, 26 Apr 2024 12:52:42 -0700 Message-Id: <20240426195247.100306-4-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> MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 9739E1C0005 X-Stat-Signature: ri81z1fyx35bpz7sbn8zmmwf5iduqoot X-Rspam-User: X-HE-Tag: 1714161185-867416 X-HE-Meta: U2FsdGVkX19SlWNo9eqSZKErm+vbzuYcm8EuxqBGACJyRMWf5pOzDZS1/f68gXlT2KyQzI6BCGrYZRBHsq4NSZWvCd+wfL6raIQUYsWszYKpUeQ/wZFHJcUWILpUO8M5oDSfQUhQ1FDr1M2YTHsOKxCcOojYyFogCKRJYk/NLP0kauLXXhdOshBZSp1MQ+VljDGxkgnp03VSGtqTK1zrDjpH3Y/jjoT6XNNdaYH+/8kyaFXRgtdnsOoG2okEWIo0KIFopa44CEstv9tIEiJMBnLI43/Vrgl2ktZ80B9VPyUnEnPq4SQFxjhYmd9OQq3Z6GYJ4TWyIxJKyaAEfMGfSZfplgJ8AxH5mU699VEShPqel2/GpE6cIMrnr7rmRL7JE9R8nlCPkGN/zP9jDGkvG38knmhZ7Mp+gGq5bYiA+GbOibN/o5uQYDNa8ahY8PANt6CcTcK1/B8alyjYlesyLCG2BsjRXgFusj3yE5/dWnssOof8AYtfEarSQg97toLxGXbgXaUVpTU2XmU1fiFfxlQzmaPBYPCEoCTQR2tyccU/Gqx+UPsfSXvfdBYiMp+iETnRKK1ehNkBAo/2eqqhoifXGv5cAqA/4kfBNnBL4SvHtI3fjuLjJ6RxEdwZsDy9u1M//FiTiCUNZF+4DevF/2+vXQpX1RnHgJ/QaqOY2GdrSbf62a0QJvmWrNL/E8EOnzjQpexuVHygm+armMUwworbK436PcEFjoMw7CE++0aZyJqeRn7zhav7rxTsNqwilstGQVsO7Nb9Ib2jNyGBuTlupYAK7YpDyI0wO03glTvN1AVyx6SxiRQ2WKD8Hr3GB9YCotq96MD63swh3owpELZDgu35cNr9/VSCnmLPFFNAwQHNf15MzYW0Nni/htuZw9t5BANRtVr95xVWE+6BYt6ZlJYN3Sr2PnnKKsvh0IFuw9CXbkU7+ByyC+KWUBJONWvihRI55HgMsm3GhBc 2GuvpEgE r/AyMKO+dYT5WklFKvPQOWyqo92cLGHsd0ybdZdkeuNBw/BQNp8+5PIFC513s7ImOvOeizRFhq0V8l+OQ+yJ6UonPOdguxKZhfknXh9y6TDZrOZ0YJ9PSoxsoNuQJTvV4kndEXSs9Ya+xJ04CBSA5dtXdPIlQPlkwagJaPxdQRvlM7iKTc4Byf8BgVlX4tO6/Cbb4tqQu5CDh6XUSmHEaF9R0pdcfTJPm1H2eeVfQjuuV+YN3h4jM/zeSbzi8cjxFKv8PaBdwOjbIhUK/IoT5XAq7ZSDgoJaQCjbub8rMjgPRDSA= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Define yet another DAMOS filter type, YOUNG. Like anon and memcg, the type of filter will be applied to each page in the memory region, and see if the page is accessed since the last check. Based on the 'matching' parameter, the page is filtered out or in. Note that this commit is adding only the type definition. The implementation should be made by DAMON operations sets. A commit for the implementation on 'paddr' DAMON operations set will follow. Signed-off-by: SeongJae Park Tested-by: Honggyu Kim --- include/linux/damon.h | 2 ++ mm/damon/sysfs-schemes.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/linux/damon.h b/include/linux/damon.h index 886d07294f4e7..f7da65e1ac041 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -297,6 +297,7 @@ struct damos_stat { * enum damos_filter_type - Type of memory for &struct damos_filter * @DAMOS_FILTER_TYPE_ANON: Anonymous pages. * @DAMOS_FILTER_TYPE_MEMCG: Specific memcg's pages. + * @DAMOS_FILTER_TYPE_YOUNG: Recently accessed pages. * @DAMOS_FILTER_TYPE_ADDR: Address range. * @DAMOS_FILTER_TYPE_TARGET: Data Access Monitoring target. * @NR_DAMOS_FILTER_TYPES: Number of filter types. @@ -315,6 +316,7 @@ struct damos_stat { enum damos_filter_type { DAMOS_FILTER_TYPE_ANON, DAMOS_FILTER_TYPE_MEMCG, + DAMOS_FILTER_TYPE_YOUNG, DAMOS_FILTER_TYPE_ADDR, DAMOS_FILTER_TYPE_TARGET, NR_DAMOS_FILTER_TYPES, diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c index 53a90ac678fb9..bea5bc52846a6 100644 --- a/mm/damon/sysfs-schemes.c +++ b/mm/damon/sysfs-schemes.c @@ -343,6 +343,7 @@ static struct damon_sysfs_scheme_filter *damon_sysfs_scheme_filter_alloc(void) static const char * const damon_sysfs_scheme_filter_type_strs[] = { "anon", "memcg", + "young", "addr", "target", }; From patchwork Fri Apr 26 19:52:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13645326 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6974CC4345F for ; Fri, 26 Apr 2024 19:53:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E7FD26B0093; Fri, 26 Apr 2024 15:53:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E07E66B0095; Fri, 26 Apr 2024 15:53:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CCE5F6B0098; Fri, 26 Apr 2024 15:53:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id AC3A46B0093 for ; Fri, 26 Apr 2024 15:53:05 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 7040AC08D9 for ; Fri, 26 Apr 2024 19:53:05 +0000 (UTC) X-FDA: 82052731530.08.D545169 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf19.hostedemail.com (Postfix) with ESMTP id D48351A000C for ; Fri, 26 Apr 2024 19:53:03 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=eLYNgvdE; spf=pass (imf19.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714161183; a=rsa-sha256; cv=none; b=BMZFZDfr4LthT7x3elbmBw+CYD+Xio7rJsB+iQCpVO4WHVoDAHIwfODUjS+LWd3CTfepLS r5YhGgpBnUygF9yQk3a0ESWStRb+U3Df8OPYrrSPipA7410oakF2FeYbi0ftZ7ZwdYR1Fe pDqh61qn+klfWKyORSyDxxa1rfpYqgs= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=eLYNgvdE; spf=pass (imf19.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714161183; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=j74d4+BPbiRtnXrjIKS0sx1DHW3jEgfXZ70m7U5yXTM=; b=PeiR/kNwBB5VGeeo+bvugvO7YR1MnMf7a8hocYArp9wL8NrNu4uCG9wiAbKTQBfS5vf6yq 6EAeDihXD3yw16eAXis7Fs8ZnPYCMlyos4GjW+VghmnuOh4EdDhAZ60DxaRRDV3Nyt9xpT w1JLDMEPxPzapvPq8W9jx5GO+oYovlc= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 0B9FC62138; Fri, 26 Apr 2024 19:53:03 +0000 (UTC) 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> MIME-Version: 1.0 X-Stat-Signature: g97iu5y54ec6y5az7oup8exsz8mb6ii9 X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: D48351A000C X-HE-Tag: 1714161183-843643 X-HE-Meta: U2FsdGVkX19oaVnhFZiac6ENGWLuIDCBmucIMbGSQT+uxsIOGHIZsOtt0IQdboWeuy1NTU6PvERMhxq0jFYPV5PNLJ8LEwlvRbtGB/G2Ta7w6nIGLYpENabZseDRHLfcS5gzNBiPuj5eDphlJso+t1gMavGTWmZg4qkldB5SV/DBIFrnTy+dE9CupVd0FGrd3nH93XkDqVF2BS9Zm6X/8SmYHl7xtdw6sec+AINlfFL3UfrjGg5knay4O3FURRA3EwH7S8g+P9kmIbGr330fB1KDCSVBqs6YmC7zb1WS41NbXZ+vlVEz0RT0/zAD7Z3CpQQYgoK9QqMxFuwB5tE5VMRJH/oU2xi9vjU82RGZWmsBXsthQWqLi2M9H+FC3mZPoFxn3cnTQ4g/bGwFtcPnvd4PQlbO4BMJ9CCSdRLOGcrPDm9rgLMcikwOyuAYjWUlYcgJMc9Z6mDl61TmCZTE6snclw0MR3jiI/zn7bFoE4plUZwdGmtq8NEoAeqSohU/XyPzrYjoG2ENKt8RQmJzaofu2frM95rXQAjS034EUdQqiahmgSXx6HQsc5aDdHiBJHCGLiNwjKXm5s71EjlzmcDLp+o6+fWgUh6D8jGX229Eip8mFDGQpaWSAmxoWfLoredbW0mZuiR050phlhIYVjVtOLqqWc7NFakXoPET/CUtm04+nN45kQAb6FqUNQYoR1QSopaMegSuzgEIbsztIE2obCm4E0ydxpXf0lJaiBQjBa61mLHa4ME4f8jEE4CERrH+yV6M3O66Xs0W0kopV4Zkhz1YV8gWyGSFdu8UH7xkE4IVd0fZoxs4CB3hfl5EpC7Qj7ny9akq3JjrN4qghfedV2Jy3a0C2FLD7fFd6KdcYgzGOWl0JVEfLgnPtTNRsmiiPg3Uvj7sUZ/qM+HBWnGh8kTsdlZJZzgPFf4W9NumTZlivhLiAEJqZPzHeqXhvGfxxSbvTWoqtFJfl/v fIXUyKKg yU1tOc+Fd/518IM2lYTupzHdik/mluWJdFopZdlkePU9xIr73RpPXPXxF7fJqHW7VZrLN1BllURzzprn2F7Cc8mo+kwL3vBMWEiSQ7V57/CUvSLpIutCxo8OnRZzUOrhfjIVkiTzGbJctLc4WA3c16TU1hyvuUSGToTVTKlBRvQJmwlf/hOZ1OxdKweaVONwFnWLvns0P0lAEQ9vyjCenRB/r0Ifoie5Z7Kz9H4KCrhOXp6etGeAVbVTBab0v48ofWLktU3R3Ur/ubT46vrB2zHmOoaYRDvct1o9lEK62G0ZWUHU= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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; } From patchwork Fri Apr 26 19:52:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13645329 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2EDCC04FFE for ; Fri, 26 Apr 2024 19:53:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 99DB06B009A; Fri, 26 Apr 2024 15:53:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 94BD36B009B; Fri, 26 Apr 2024 15:53:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 751BD6B009C; Fri, 26 Apr 2024 15:53:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 56C316B009A for ; Fri, 26 Apr 2024 15:53:09 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 0516E407CC for ; Fri, 26 Apr 2024 19:53:09 +0000 (UTC) X-FDA: 82052731698.12.A0F2E92 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf09.hostedemail.com (Postfix) with ESMTP id 2965314002A for ; Fri, 26 Apr 2024 19:53:06 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=FaY7xpWf; spf=pass (imf09.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714161187; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=FUsxGwmTJmnXa2I6dVUNImeXfxXkmfH4l07M6DVjAxo=; b=dbGfhR7l2jMN4r/JEAL+CWdsGbYAj7JoApIdgxbxXBJSRhG9tluo8XSIUzavh5bXUjDyiH 8n3aE2It7hFDKIZydVZKY4JNkaotuUBiVC5iFLSd4lmOd4N0IHHoTgH9rwpsIZSYs57Eyb Oqu26e16M7BNqbKzVuRgKNUNFeKX7Uk= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=FaY7xpWf; spf=pass (imf09.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714161187; a=rsa-sha256; cv=none; b=5GyRwz3oVhcLaKS5VQoMZMRI+nVenqUi7fEaR2T7NiZNBXpRiZnmwonOEGPZ8qiCtGLW0z qvXI8MWnK1YJTpfvSPXEyNRk/HWF/q3TdF5OIfEJSdcACiH6dQjSdRPaBQ6efqgZHlxteD kzczAhygSTKxmf6p4gy/QJojAGQkpuk= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id F3621CE1D0C; Fri, 26 Apr 2024 19:53:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11159C113CD; Fri, 26 Apr 2024 19:53:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714161183; bh=Dn52cDE5Pk1z+Ex2+NSRLPE8W1EnK4AAtmH09ziQ5Go=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FaY7xpWfrq2qjeYXOwwOAZVETK3xRZ4BxENUObbcz7u+jRxkYrBEvm858VQn6g3W7 Vekg9u8ya7fwc0J4yH0UOxjzG6Np4hOXm+/eQoHQTN+mVOAaxSNhpFobPivRMWZk+0 JuamddyfKk4YlShNuwYzemkcyyidfA0P/kdAWMRGBjCvHKAetm3nVO91ytlCvyPQFA Ugrhr/lf5hM7Q5BInN/rFbGaTqlMOiNKhBOYrPamVy11SiKWIZr/aP//bGpfDO3Zmu gQuVQ1NTskmEnwjxWxDMtkPsZOhqTng13jmR1COz8BfNuKdpCD8esBcuhvZ3RDnvOp qf21CwHedF6lg== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Jonathan Corbet , damon@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] Docs/mm/damon/design: document 'young page' type DAMOS filter Date: Fri, 26 Apr 2024 12:52:44 -0700 Message-Id: <20240426195247.100306-6-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> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: 2965314002A X-Rspamd-Server: rspam06 X-Stat-Signature: bhkkp8gaye9twdeadnniqqgxtotty9ca X-HE-Tag: 1714161186-960967 X-HE-Meta: U2FsdGVkX1+7fb6ozjnJOH009WTks2tCX7jHiyGcnCS59IkTJKSeVvwVILa0GCwAKLaDBiaTzwUK6U9qXtNsdBzAcARCpYaqMrBmBrqryjG92PsEq8A8uQROG4sWjfWg/bO+hCHmbsSSaVaOXVvTrX774OTqh7Z8sKfP9weAGNOFwn7u2B+fDs0NE8krmUHNGnCkQiItvq1ZTM95ofD8F+iqxRbieBcUk3ZaBJ/L36CDSK3bePodCfWqCK8HZqA/lmka7ZxcjPxC/5doYy+ud3afsHEKPZPoh8VK1tVIdPTvBZYacTtdeP8WIiVql8uIrTSoR8rUOC1M0ipXuhcZGQ3jj978uklbQtwCTWyWN+UmUR0AmXYdOs/skA254dOvKqiVE1REiFRKKxwoAAoVmBk87mOrFMojOnN21tVg8Wfdk0sHymUDpH5CAxyPaHqhKALfrdBcDJLgUAgAzlfhXZuOQpGcOPFTzT+pt7JBL+f0Sb9jgZty/aTmQAKdobAigzibPVsNRMgTqH1vgGyDZAYa3sL67NV0Q45JZZNmQeSZUJHC5CkisbkcaGJGBXYHELa7q3UC/ZoDsHhXH/Jojhxhr+y/hrCoRJtdntUI6cbSCyU+hTamX4/P45eq/8zyTLmqKxPhJqQEhNcp8IJtsgnJ8nk31RPrey+tRdh4cb5q2f02NzHCJ2estYr42sDtaXqAb6TDUiIG+AWJf0e1hIstHD07BepY/FvW19O5NXvBZviQZTJq5/LCI68+3aiLGBVoOIWbj921PiLZXfoAXW3c9lFEZyh9+6xzHyODbIsDCIXG+g7DETShUlevBJuIlYGYSSNBEu5w6Xi+4rfRFB2zZeic/aliNCbf72LU5+wK8xM9U6DxAJzc3vj+12N/RVK86Sp5Tw+BFY0I6YZjC5YL/dzpderv496irSc9BVM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Update DAMON design document for the newly added DAMOS filter type, 'young page'. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 5620aab9b3850..f2baf617184d0 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -461,15 +461,17 @@ number of filters for each scheme. Each filter specifies the type of target memory, and whether it should exclude the memory of the type (filter-out), or all except the memory of the type (filter-in). -Currently, anonymous page, memory cgroup, address range, and DAMON monitoring -target type filters are supported by the feature. Some filter target types -require additional arguments. The memory cgroup filter type asks users to -specify the file path of the memory cgroup for the filter. The address range -type asks the start and end addresses of the range. The DAMON monitoring -target type asks the index of the target from the context's monitoring targets -list. Hence, users can apply specific schemes to only anonymous pages, -non-anonymous pages, pages of specific cgroups, all pages excluding those of -specific cgroups, pages in specific address range, pages in specific DAMON +Currently, anonymous page, memory cgroup, young page, address range, and DAMON +monitoring target type filters are supported by the feature. Some filter +target types require additional arguments. The memory cgroup filter type asks +users to specify the file path of the memory cgroup for the filter. The +address range type asks the start and end addresses of the range. The DAMON +monitoring target type asks the index of the target from the context's +monitoring targets list. Hence, users can apply specific schemes to only +anonymous pages, non-anonymous pages, pages of specific cgroups, all pages +excluding those of specific cgroups, pages that not accessed after the last +access check from the scheme, pages that accessed after the last access check +from the scheme, pages in specific address range, pages in specific DAMON monitoring targets, and any combination of those. To handle filters efficiently, the address range and DAMON monitoring target From patchwork Fri Apr 26 19:52:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13645330 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61DD4C4345F for ; Fri, 26 Apr 2024 19:53:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 335A96B009E; Fri, 26 Apr 2024 15:53:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2BF386B009D; Fri, 26 Apr 2024 15:53:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 138ED6B009E; Fri, 26 Apr 2024 15:53:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id D82106B009B for ; Fri, 26 Apr 2024 15:53:09 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 8AD87C08D9 for ; Fri, 26 Apr 2024 19:53:09 +0000 (UTC) X-FDA: 82052731698.28.34E9A7E Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf24.hostedemail.com (Postfix) with ESMTP id 4BE5218000E for ; Fri, 26 Apr 2024 19:53:06 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=DSFNDYcZ; spf=pass (imf24.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714161188; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=BM5nebvS4moKlSYBewH8Mgk00Cqm3ZMX+/8gbuFwpuo=; b=npvv6gFFjXPhjyDk6DvKOeLjUep5xFrxdsVx9wkxh9G7t8bpkyeHVo8SS2bHLvhIGcTw3R So0COiNzhZmK3JTDvpd8QJWcPXnjujXowQwTXjLEa8tIH1AFqRYX80RwOVruJ1n/pCBnl7 p/xzMbQZ4kqn+QEiZl8ak7mfrVMSIrA= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=DSFNDYcZ; spf=pass (imf24.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714161188; a=rsa-sha256; cv=none; b=o7iWq3gR3bO6AwN5YZP0cvYGv/DKzOeRtvi31VyZNUZt9Mug2AF14c8wkTMSlHDiFQ/K7a irgtHNvZOvwpspKmwgXD8RDaf06diDxXkTIm0sgO5paL5nlykVxKsViQc+LSuGeQN/0TVY NzIywVG8akvc7GdJFKNAPOG4vi51anA= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id AEA77CE1D15; Fri, 26 Apr 2024 19:53:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3142C2BD10; Fri, 26 Apr 2024 19:53:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714161184; bh=K2q9FissW13tAkvxEMeW2S5JbkJ5qv3UfNIiwo/yV/I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DSFNDYcZ5ydHl9BLQEPGlilvTLW2NF0PHASHNaeYYzH/IQkb7TIhayU7DHFGXKWuq yDnjWbS6g5F/zwAj2dSG84H1DBt9ceqztSEcropReTs4M7kuxPV9TThRzeKu/JuD0U h2gjAkllDCJQSEr4OWpX16oU+h/cobOIqx/kvuZr/ZPvqRxLsdDz1TWq58Y1uSjTdB KG2/YRUz3XFQ2lUMj8D4sUDlvXOvo0ZwJYL+Zh8slDqm6FtGDbhgNPxTbZ/CqoMjY7 4C07ybL+Udwe/39rogZpBtUgPe9/Cefr/RZWfqMfcHwYR7QnGWrNRTLKkjCC5eUayp wgHoLmDGbo8Nw== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Jonathan Corbet , damon@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] Docs/admin-guide/mm/damon/usage: update for young page type DAMOS filter Date: Fri, 26 Apr 2024 12:52:45 -0700 Message-Id: <20240426195247.100306-7-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> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: 4BE5218000E X-Rspamd-Server: rspam06 X-Stat-Signature: 96frcom656py8d9zah9fsy3u4hf7ubqj X-HE-Tag: 1714161186-301840 X-HE-Meta: U2FsdGVkX19Y5e7xpkP8nTihjwqGgI8YYwrZYp8bAlvAdN2STu65AzdsBcoEv8vWW7Ry2zKmpcWfLHN6JVx5164+mxmltZr/VP11FMNnFEsdBzV0SlrSVIJTGRCZ1C4Fcy94X2k74gDmQEYTUl0z/0bbU2wy4uA2Sbwcjvk0tROrXpjfQF5WaD4+u5w2RQJRZZnINsfK7Hier6ej3GzoLAGATbQOJfGo3MXsXuuvJNRO+1ZVVz52Q71nYtw0827/x4gGrJJ5J2THz5hMW12+UWkesn2yKaW70p+YxSR5x43KZZ4U28cH70IIwl2W/NIfWmmIkcRnoF9xxN/frJcTt3xcsXjwVQdfy4A8cNjkU9llQz6zXeJM+futO+yd1HqzPxoagi/t8n6iZ9aWKq63b8D2Jv1Pke7Zn00SdgUfdpdX57qM5sWC7P/LfgzWffpizf2JDaedexclFB9fBEZgDH+YsH7wLwCD9Gsu4Yd74XcaZ0Kr4VxxfC6pQF82yNg8vmc0CLgPxqOsoy4CyV/HAUGJxfnQkTJZ1t1pYKAQzeAyAC/ig+G6lU9+MHq5GBs73lwxkT98KPfcD0ccpIEcSdDX1xDtshyHXs9nSG4fdF9LEROsQI16WUV4pXI+lZ81M/+quc8kl3kqomSXPVXB75qUDFKImNn8cnGehwmpb4jfRVP6UNiHGEOWsgFza2VSiBo8nHjh92tabCdgFcoQi7jpcsi2eMPM3Y9PALsNng7ayIvZvXU85UIYU2mMk4WBpXMacBGkrqAjG/Z6K/9gvRWnU/eQWpIQTy4LrvVjdU8Pg4sQ1mfBb4xWg//LJ8plBY7sXaOjL6x1pdXZSOStV8m9DskbAFClr8yavmtSMn0Hz4/8yvkdpQC3ptV1FA/U75bPAqQXmNHCWJp0xjFCFb4Xpm5oUjzjr9QR/D8FkphluXIrcRx+02UM7EcuI46irj6AB/wyyDaGiK3Wv48 OSc+D+sN ogg1EOHOaMe1PWCDUkNCtyRluckoxn4lIuP7328TlNY7fWpo7HMWv5cfOwOsTGiE7hb6a0ht2xDpLRuw6RhQ6BQk/VZgn0Czd/F35OB4BKlm57lUmVckA6U60ksUNNffM5dtjmIb/SgXnlUMA//GrjG5hiZp0kP0wH78A42u/qac96r6DNU5KFf2mykqcT1XcQep57bl6Hbq0pyjcgR0bsdUZRSmD9p7ajX6lSFqLD0fbIkE= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Update DAMON usage document for the newly added DAMOS filter type, 'young page'. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 6fce035fdbf5c..69bc8fabf3781 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -410,19 +410,19 @@ in the numeric order. Each filter directory contains six files, namely ``type``, ``matcing``, ``memcg_path``, ``addr_start``, ``addr_end``, and ``target_idx``. To ``type`` -file, you can write one of four special keywords: ``anon`` for anonymous pages, -``memcg`` for specific memory cgroup, ``addr`` for specific address range (an -open-ended interval), or ``target`` for specific DAMON monitoring target -filtering. In case of the memory cgroup filtering, you can specify the memory -cgroup of the interest by writing the path of the memory cgroup from the -cgroups mount point to ``memcg_path`` file. In case of the address range -filtering, you can specify the start and end address of the range to -``addr_start`` and ``addr_end`` files, respectively. For the DAMON monitoring -target filtering, you can specify the index of the target between the list of -the DAMON context's monitoring targets list to ``target_idx`` file. You can -write ``Y`` or ``N`` to ``matching`` file to filter out pages that does or does -not match to the type, respectively. Then, the scheme's action will not be -applied to the pages that specified to be filtered out. +file, you can write one of five special keywords: ``anon`` for anonymous pages, +``memcg`` for specific memory cgroup, ``young`` for young pages, ``addr`` for +specific address range (an open-ended interval), or ``target`` for specific +DAMON monitoring target filtering. In case of the memory cgroup filtering, you +can specify the memory cgroup of the interest by writing the path of the memory +cgroup from the cgroups mount point to ``memcg_path`` file. In case of the +address range filtering, you can specify the start and end address of the range +to ``addr_start`` and ``addr_end`` files, respectively. For the DAMON +monitoring target filtering, you can specify the index of the target between +the list of the DAMON context's monitoring targets list to ``target_idx`` file. +You can write ``Y`` or ``N`` to ``matching`` file to filter out pages that does +or does not match to the type, respectively. Then, the scheme's action will +not be applied to the pages that specified to be filtered out. For example, below restricts a DAMOS action to be applied to only non-anonymous pages of all memory cgroups except ``/having_care_already``.:: From patchwork Fri Apr 26 19:52:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13645331 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B637C04FFE for ; Fri, 26 Apr 2024 19:53:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D98016B009B; Fri, 26 Apr 2024 15:53:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CF94D6B009D; Fri, 26 Apr 2024 15:53:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B746D6B009F; Fri, 26 Apr 2024 15:53:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 94FB66B009B for ; Fri, 26 Apr 2024 15:53:10 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 57FE8A20ED for ; Fri, 26 Apr 2024 19:53:10 +0000 (UTC) X-FDA: 82052731740.16.A66D15E Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf23.hostedemail.com (Postfix) with ESMTP id 55CBD140003 for ; Fri, 26 Apr 2024 19:53:07 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="FG1/Aps5"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714161188; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=gd2wJP0bP+rGAI3APmv6wVSIbEU9SsfyzqTfPWGBhZ0=; b=HxLPJ+3KdlDfG/S1JnMB/Yh+2rIIE/UKwfZapHJengSAIbiN8s2TQHoLuAoUqZWSN6BdP3 7FBqRj/9jB7w9Rz/x0Aosik9ciWni65U9hP+V91B7WPCvNy/xgsbqMi/7Vh0JwzAClfy5S esGeR14+CRHdRmupF+sNYSkHMaDCiVQ= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="FG1/Aps5"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714161188; a=rsa-sha256; cv=none; b=70/bky/47xwOY0WLaFpEBuH+YGPeUDFcGAD77arh/hvzsoXxYAsKp1Bj7vShO4ui/fRqTW tywAGl5WikQxCC8I6woSqF0Pbkg1bANXxYVFBF0QFTDagPHlVb6QPizj7/3/WWgwQwDRlV o0EyuFXdmZHOmEf4WAQ7eMfFwVpttek= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id B0E62CE1D1D; Fri, 26 Apr 2024 19:53:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7EEBDC32786; Fri, 26 Apr 2024 19:53:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714161184; bh=RA6PboPvhcVkcAJe7wxUVuzFYhYpojur65LWu1bwj5g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FG1/Aps5GdL0Ks9HkrFAnjcXf1jDcQeMztQLEUxPkyemkrNBlIsivEPFXVcOTghO8 nYfvAmqq/jLd0QJIQ7nJWQhtzoxG+eMN/rkImGY83QwoclWSEY/DowaafLa+0HVTQf GO9/K0J0GT5WbYUo6R9Y15igkF7m9WVDW/x0amkvWAyoOxkgqKD5FdSFSDToF9Rv3d DDK8WT1EKG4bulBdxb5t2B3atQrNwwnxI5TBfTtcbYwYs2QhPLQHUFGYqqtq1JOxYc fuwBZnSGjFPy/RSxgjOPphtBHKV7Tgi0eh7aQEXWKpVV463lTnG0aVDIPqU+DNk87B X5+ZiaS3UEROA== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/7] Docs/ABI/damon: update for 'youg page' type DAMOS filter Date: Fri, 26 Apr 2024 12:52:46 -0700 Message-Id: <20240426195247.100306-8-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> MIME-Version: 1.0 X-Stat-Signature: 7p5ixcoaghd8epcgx7berdrzrawfxbfe X-Rspamd-Queue-Id: 55CBD140003 X-Rspam-User: X-Rspamd-Server: rspam12 X-HE-Tag: 1714161187-775853 X-HE-Meta: U2FsdGVkX18rh1p3iY356RynvyGM+4nMqKk79Z9tnIRmsE93wJHWju0g1bbx86yX+KtcESbcDKxkP/j/8UegrNZNoP4nbAZd427oqo8AMpX2ZffzGbdniijE9cDj6GOZXAW1SEFzGaaEvonfgxQAWj6roAKuYDmqf0kHJ8YPgbRH7EpnLI4JtG7q/5dAQ0CvZe2+9Kc+IuMGOTSmRlASxtD6ppI3JImey9HBkMbUfxGtDoBcQHTOdjpE2SE+cYBNFcyOsRkXiyJDJa1NjCo3hWuJHBuj+cfIri7awgKOWXq4hOZmSroqxLlzuZBO04+CrcmvXKPSxefvkQoZB845VnE1PNATazmQDRhZeJChkcDdGHVr/CHRTZiBHeqD7W7jOPmHdvvYcpbR7/qKPY9294PKpTX04VeiXursG3oqi7yM7GI3jzv5KgYoByM19sCfk3pN19dCc8KPN1pVMbffnNzMiSe9Qw4UpzCN5l80niGtrwogjoH5eVtmOd7tBw6GXZ0SD2bM6FC7F/crDpUEqkyK+15uZofE8Y31rtzyd0Cak7RnAPDlbKOEG2m26vhvODgidSMbPCoeQpx57yKyZ0a4D8SCrWZtb5pWgFEof2dJmGqeK4gcbpuGzpmo04alWzMULKlEDvbYGo+BxJTiDiozAJAqGWwCz8JEw+cQ2RkIMP/h9PAzjSKEwapalwpOEtAgvXYsz6s9iueAazMQ0+TNfhXuCgjPpgXk7DGySu2AfgfhiTf0cpoVzk4Kc9KWxGgdEbw9INiVOWtHK8Z0iPYa5Vbkz2u0Gcw7gKxlVhqlujrQ+q1TZ0KGaQZcs95vUb+f1Xj2CZHZshRYo33/cjeBkZEp3Pfa0QBS5uhw/SSNl0IBT8G46wfB8bsMuryoKTtYh2ZVOt0FUA+FqYAzlmmV3A5qqG7/DjnSm97Us8vN3X9ohkOjNGhjxDozzJiw5ayy64FxbQPMZ9nw2SJ nDjPjYgg bX/HUlfEuMVLeNatr3Djoh55aVyu9dAgeZcbzgjrEB8cqRceAovHJefNYNRPEm2JZsU1QQqnqZOEMRjql4ULoGVXJLEpptpJZ9ALKSVjLEKWT2etnhA61vO+oXUPOoayS1R+flIzbQjFu9ob47v5cjg+bY/7AriGkghHhnw/7JaqRbDg7j9rOFU8eX26dUMNHRH9FT+GWx6MewATsJhcImurDEO76sBYrvICHolt55kJr9kVVeNH1zQ9YMc7ImIPvwUTT X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Update DAMON ABI document for the newly added DAMO filter type, 'young page'. Signed-off-by: SeongJae Park --- Documentation/ABI/testing/sysfs-kernel-mm-damon | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-damon b/Documentation/ABI/testing/sysfs-kernel-mm-damon index dad4d5ffd7865..cef6e1d20b185 100644 --- a/Documentation/ABI/testing/sysfs-kernel-mm-damon +++ b/Documentation/ABI/testing/sysfs-kernel-mm-damon @@ -314,9 +314,9 @@ Date: Dec 2022 Contact: SeongJae Park Description: Writing to and reading from this file sets and gets the type of the memory of the interest. 'anon' for anonymous pages, - 'memcg' for specific memory cgroup, 'addr' for address range - (an open-ended interval), or 'target' for DAMON monitoring - target can be written and read. + 'memcg' for specific memory cgroup, 'young' for young pages, + 'addr' for address range (an open-ended interval), or 'target' + for DAMON monitoring target can be written and read. What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//filters//memcg_path Date: Dec 2022