From patchwork Tue Jan 30 01:35: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: 13536655 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 5A9CCC47DA9 for ; Tue, 30 Jan 2024 01:36:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D284E6B0085; Mon, 29 Jan 2024 20:36:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CD83E6B008A; Mon, 29 Jan 2024 20:36:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA0BF6B0093; Mon, 29 Jan 2024 20:36:00 -0500 (EST) 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 A9A226B0085 for ; Mon, 29 Jan 2024 20:36:00 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 7E242160AA9 for ; Tue, 30 Jan 2024 01:36:00 +0000 (UTC) X-FDA: 81734261280.05.273A27A Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf03.hostedemail.com (Postfix) with ESMTP id DB66A20010 for ; Tue, 30 Jan 2024 01:35:58 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=TyTGrLjQ; spf=pass (imf03.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=1706578559; a=rsa-sha256; cv=none; b=zxoC3mr68w1RJJNWa3u2EDO2YIsBGSF1dNYYMCDqdxnvPYBuR8sWQ/bJcRgPhDfjYPuFNQ hyjxcInwq2W6LVb/WSKRQ/uCMXiOTgB4sA7kab/dNoQLpSRJRBTD+E1m3L32HdG+GjQI11 5EFdLvn2/tqbJJ4o1fBY4/vePWwf6yY= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=TyTGrLjQ; spf=pass (imf03.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=1706578559; 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=UzC8ulRKhx2TkCWNSpXrkL8CCPSSFTRwD3zm/bCozXE=; b=uYdpmTgDdeP/sX+N7QeIsuzQkxOMLbzlp+cXef14QRW+944Fe5OZ3dmdNu5N/Ng5KW7drh CIMs/sL3Dp8ItGBM6MgDvG17W6ySuRy58lqvJdzAHcXuoPyRZ6r45mEPPvS8gqFdHcGLGO Q56dJ/YQolWb+yet1AmiSE1eBGBh1ak= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id F019B60693; Tue, 30 Jan 2024 01:35:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2ADB8C43390; Tue, 30 Jan 2024 01:35:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706578557; bh=77VtE5VeGNNpbwa0hrebctF5G9UJB4sc86yojoaICLY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TyTGrLjQCQhz8bD5mowo3BX2lOX8zP9+UFaUtGUfheU1Uga89bmlQqQelNt3gE8hy PauFBb9VoHKnGQDPacecP/BTTR1EEFJC3kkM57zEqm/y1HA5DXYwSiRz7BkD10BbAZ 4N5f0LVlsLMTdBmyHOQyegGstohPrML3/8mtPMvJuIa9a5AegAE33ILmxRSQtbJR8/ dHglWue96C9Z8l6orgyB+HDb8j8V1+P4e27BBR+IdlQpT3ItD4Gq9VOBQIhO5FvDs5 hK7URWQ03wLuU6J+N3oUBz+Kp7yAvXCYx4uPCzV2e887ccgqZn9cVhd3QcGqEmvk9t w0mJHW11Ao0Sg== 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 1/9] Docs/admin-guide/mm/damon/usage: use sysfs interface for tracepoints example Date: Mon, 29 Jan 2024 17:35:40 -0800 Message-Id: <20240130013549.89538-2-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240130013549.89538-1-sj@kernel.org> References: <20240130013549.89538-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: DB66A20010 X-Stat-Signature: yche9co6j3m1fhnjsugtenzxektoy9ki X-Rspam-User: X-HE-Tag: 1706578558-589199 X-HE-Meta: U2FsdGVkX1/02eEJpWHOIA0vMMn3PimD3ZFS4pyYpwJtktDuCKMJb5WQHCYgk2f0jrYqCqTQhqF7f++ZKjqLs9BmaMczp8usHYl92y6Y0YxCThUGqRSmUFVSje4n69sT1ZReVZsjZX7Di6C7mqipGUKOQpIzMb7aXtyaNKghC5kY4V5U3ASQ4m7gx6kb0QbGle+i9QU4/LqmgYDHj606DWstRcNGHxUsShcBV1Gzp11WmbcOzQ72r421rfuwEOAEUO9HTQFDZHYImvwfu3kFjsESqprONUGBSrvnumVdl1soElsZj+jnHNo4M2jjwNEh6KdmPA/3r5haGemvHQMFqEs6hGYIdtWGv7YU+vahk3C8wCBSVRd7jcwMq8/+KdXQ+FWnkronFDk9eE0X9gXpvPdAzVZhGf63WGtnQd+TW7t+aLMu/BkT4UU7cxOTiy/DzEdzJWyzOffMO4JZfyEqNWgkUvau86W8s9mvHVO5+ONzv1Lagc6eWbZKa+AEL4/BstA4JTZ5AlRzUqOvzUCA2pXfeGJwbMCRDsQYNa3NhjQgcDrlfeg1lrMjTSNsLgbiTOiubZu8yR8meLLPRoq4IDX9M99h7/djE9OiZKzIOayhVjmROnw8OhFu6NsY9D0I5g8f2FxL97RZ09JAmeNwKUoOt5icJ2wBPF8r761k1W7W+EibzInXBRZERKz5D6ZzsAxtJij1qiRUvFhnq7uLw8AK17s5h6EUIddLwfwIwMBAHk1dJTs+Fz+oDir8DpeNEtZhLNfg+EHIxFaerXWu1gwh5fJJKPexfFF/rajMHUxKW6Jk/UxI+Qb1RkIJwqnlKtRpCJFEr954AY7COSK9w2wNSLLy60Db6EZYVGpJ098x+Pz8oRmVKgA9jhBzyU/l6+HmumI7aAfp9tf+SyLc06kUppscpG7MHeBeqQCgJqQdcqRkmJqQmx2+7ckJf9BxjgixpKIbSLot9szReSR d1+x2kVn Dd6bLas3ZrodwaH8TqAbjpjoxmbR2CzJFtY6HTR9mmas2Rd2YlpDX8AyLZBqGhlfqzMS5gB6KUd76ibYXparcE8f5jjR7u99BaGS+CFYypQ4x2zbUVLpMNQrwYXQInd5CHNaqvENILHxCMhDq/Tw6cy67RjLjPAwI6yZIqeIHGtaGVkr857JgbT5GN2HVfaTz7QyO717Q5+BCYa4+DF/LUU4arsv9xb7nN6yeMDI4qv2wIDQ= 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 tracepoints example on the DAMON usage document is using DAMON debugfs interface, which is deprecated. Use its alternative, DAMON sysfs interface. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 9d23144bf985..f2feabb4bd35 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -579,11 +579,11 @@ monitoring results recording. While the monitoring is turned on, you could record the tracepoint events and show results using tracepoint supporting tools like ``perf``. For example:: - # echo on > monitor_on + # echo on > kdamonds/0/state # perf record -e damon:damon_aggregated & # sleep 5 # kill 9 $(pidof perf) - # echo off > monitor_on + # echo off > kdamonds/0/state # perf script kdamond.0 46568 [027] 79357.842179: damon:damon_aggregated: target_id=0 nr_regions=11 122509119488-135708762112: 0 864 [...] From patchwork Tue Jan 30 01:35: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: 13536656 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 53D06C47DB3 for ; Tue, 30 Jan 2024 01:36:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 90D956B008A; Mon, 29 Jan 2024 20:36:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 893B56B0093; Mon, 29 Jan 2024 20:36:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 670F76B0096; Mon, 29 Jan 2024 20:36:01 -0500 (EST) 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 59F6D6B008A for ; Mon, 29 Jan 2024 20:36:01 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 2404240261 for ; Tue, 30 Jan 2024 01:36:01 +0000 (UTC) X-FDA: 81734261322.02.9587677 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf18.hostedemail.com (Postfix) with ESMTP id 811171C0014 for ; Tue, 30 Jan 2024 01:35:59 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=CKZfRcZj; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf18.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 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=1706578559; 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=WzEYvtVjS/xSTfNpoix0HiMc61saf0CeN3AszWfyWPA=; b=3sPwx7XfJ2P7DpK6JTGSFEaY3CbSLCm7y0f8zDizjGzA7KHF7eNx4lWM3r8RyFsO5+18vT PDgmqh+cnumoZlKmIJuuc4PPXaJ43uMQWBk59UTkqvpTMC8xVbaq4qMZfUXWEUZNyJ2EvI sISDePodqaLtm0RINVzGp61tCMfnmps= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=CKZfRcZj; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf18.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706578559; a=rsa-sha256; cv=none; b=oWZ7yVjCF9s6dt68IHSDWERJFsylpF2SjpadhPu4XdolqWrXfu0j3SZ+3o4i9J8AaM8E85 QtyviB+zcBY0KlJqAePZT/0VQkLO1/ZefLAN94/eh/GZ1MiLWCBTowzMzDjAzHupxricqw kzHs/dttIaVvqujfgAU7c/yqSwwCvaQ= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 881556233C; Tue, 30 Jan 2024 01:35:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D67DBC43394; Tue, 30 Jan 2024 01:35:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706578558; bh=GSL7nuFSaQ43gT72aNum7HC23/clv4WedM2oZBR/GrQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CKZfRcZjeMJaoFjnzl1T3ocvC/Uhe1cyzn0Rc/XlnkaJj+m8bW46azfzCAuxbWIjn ewYrYf+SX915gV51UI+fD+Juf+moFNFV8MT15MTOIC1sS5Sf2YrvbufrC6MDxeidSc JdIqXBP51Er2vjIiDvxotFCBi4JC0GwO0yHvVrrigMXoRUfYpq8mniDcee5NfVkdqM te+wzvlVzvP8MoNEKUoCLL70JAR0WKcmZD4ugSL6B1yRmpLXJfm9RvKlB0l0OnmYTm 04Sb7RUNXerZ/8174TpYCB+CbhmjLKtX915YANCjPBkRq+5saAwP9Fj6G04a0cgKun hPWm6PJgR8KEQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/9] mm/damon: rename CONFIG_DAMON_DBGFS to DAMON_DBGFS_DEPRECATED Date: Mon, 29 Jan 2024 17:35:41 -0800 Message-Id: <20240130013549.89538-3-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240130013549.89538-1-sj@kernel.org> References: <20240130013549.89538-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 811171C0014 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: buaukd5j9m1r3iocqm9dhdxbydahp36y X-HE-Tag: 1706578559-628266 X-HE-Meta: U2FsdGVkX18+XXbkoQEBx4RmmgT8uUwP5SNjOkrpXFvAFRSBPTaUtSZyMnRNjVzLTMXpSSQb4D/zb+6A/a5PHD/k7vH+C6WjKJ0ebH3oWkRIx0SNpgQ4Uj7F4jEeiCNnWv9dp7P0O9Hij+glE1Nh7+pgxzmH+20ZHOyzP1LoEBqHqVF2j/3+kh1jdYQtlZaJVQ7W5rzLqzMcqjZhVBfd9EMbFxY48z6WP86IFAKX5S2vnn/CQnlz6JytsjsCTZj12mFdJK4CYs3nuSLYxubXfEHgZfmyjI5Alw0km9oISieEYwlrLTzkYXWv8fvz4ddwmL530HsF8DriJujxGBgybkfClKww3WNAywtDQGJoTi/acbLWE48iSPVBJ4YFeY5joEIWn/tSvN4kqZk6WqeWgPJNwjNc4bEgcUcxGPH3RhoufsaI03oOYy6VNEPHyVfKLalNWchIby8CczpO7Nl+BAMvWuLc4v5YXe/nBOuPLsdO0QpOtnm9NShTBmTE31QuJc+gP6lKixl9OM/4kn+Lll5R2T6/yp5oaa1qOLrCtWIyYe+5qhiRNaME4EF6Y/xsdSygk1Eak4w83p2q3m/knf/oEke2kSF62oXLEESkICh9l/NDgKWtzh3ivCw2KKwPt9DnWJsdAM88wv0doluFSNZyHkGE7/TMV4IeFNRacbAqnDO37zTlxeoslDyIuDURAp3VA+BzOUYuhL5g70mrIEPxk/hmZ4XBFAifSEKHE637TsSDQaTbnynO4+KYvGFTF+gadHrJWEIMLjmwNj4tpGNYHHvjIZ1L1BjVkEmNGX1X/s8+MTrOqiOsjWFLss1pu651iplVp/IGq3cc91KBzSHyGQznh9HUVIlruy4zvSo7CdEHba4oyPX4bq7MSVCZwcy6TcJEEjeGjjwon4RZ8S26NaGt6oOQrniZIJgsXSuVCSvB7eKB/r7XZ79nFkgzH5QFdMzhdeRgQTxXcEK L97b9rLR dBCUha65w3xkF5wRxkEcRWHH5BRBNZu5njdjeEu5fRQcQzS9GBGpgaEgEJIymXQqViPY6PPUpTL8Xxh2PWWIkTfUft4VuwmiQN+V7w8oH7xP6qkBuFG+mQpB9bLEvwujpF96Ug+WxF67zMzneQGz1/apYgw4O1Ds6BIQ5Eh7166Ha3hmVTl6N8ukLwTVlkmRNtJmFyZZZvFR3vu9H5Xvm/ITaj93IVlgQRbN1ljG1SqZlHrLvg59YksgJRbDFDB0wpoV54aXQ6BcM9uV4tckO4uYI6ix6ASD7/N77WZObPGgWH2pfCVs1MoxTN0bacOcNVMZf8sFl07h83zUCqhiSlZu4cw== 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 debugfs interface is deprecated. The fact has documented by commit 5445fcbc4cda ("Docs/admin-guide/mm/damon/usage: add DAMON debugfs interface deprecation notice"). Commit 620932cd2852 ("mm/damon/dbgfs: print DAMON debugfs interface deprecation message") further started printing a warning message when users still use it. Many people don't read documentation or kernel log, though. Make the deprecation harder to be ignored using the approach of commit eb07c4f39c3e ("mm/slab: rename CONFIG_SLAB to CONFIG_SLAB_DEPRECATED"). 'make oldconfig' with 'CONFIG_DAMON_DBGFS=y' will get a new prompt with the explicit deprecation notice on the name. 'make olddefconfig' with 'CONFIG_DAMON_DBGFS=y' will result in not building DAMON debugfs interface. If there is a real user of DAMON debugfs interface, they will complain the change to the builder. Signed-off-by: SeongJae Park --- mm/damon/Kconfig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mm/damon/Kconfig b/mm/damon/Kconfig index 29f43fbc2eff..fecb8172410c 100644 --- a/mm/damon/Kconfig +++ b/mm/damon/Kconfig @@ -71,7 +71,7 @@ config DAMON_SYSFS_KUNIT_TEST If unsure, say N. -config DAMON_DBGFS +config DAMON_DBGFS_DEPRECATED bool "DAMON debugfs interface (DEPRECATED!)" depends on DAMON_VADDR && DAMON_PADDR && DEBUG_FS help @@ -84,6 +84,11 @@ config DAMON_DBGFS (DAMON_SYSFS). If you depend on this and cannot move, please report your usecase to damon@lists.linux.dev and linux-mm@kvack.org. +config DAMON_DBGFS + bool + default y + depends on DAMON_DBGFS_DEPRECATED + config DAMON_DBGFS_KUNIT_TEST bool "Test for damon debugfs interface" if !KUNIT_ALL_TESTS depends on DAMON_DBGFS && KUNIT=y From patchwork Tue Jan 30 01:35: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: 13536657 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 57234C48285 for ; Tue, 30 Jan 2024 01:36:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 279EC6B0093; Mon, 29 Jan 2024 20:36:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1B6B96B0096; Mon, 29 Jan 2024 20:36:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F23C66B0099; Mon, 29 Jan 2024 20:36:01 -0500 (EST) 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 E18B16B0093 for ; Mon, 29 Jan 2024 20:36:01 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 8AFF31C146A for ; Tue, 30 Jan 2024 01:36:01 +0000 (UTC) X-FDA: 81734261322.01.FDDD925 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf10.hostedemail.com (Postfix) with ESMTP id E5423C0019 for ; Tue, 30 Jan 2024 01:35:59 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ar1EzV9w; spf=pass (imf10.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=1706578560; 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=5mrOv/KaRHlajCAYRKUp9Gv9XtpHmCRS/i1xDUtovrg=; b=CCwc/hz4+FeYcx9rNoF3KLijv2sMBbW++RjuikPLr9vN/IsyrjCMY2NCa2CcWJ6f7S9yjq mWuK95JAJgWeso2M9lajwjZPpuCB1pgs55p1N6islhiqBG4cHjXGCoK9sUKMt+nO2PXBhd qcF/kUPy/nKwD3D6/7mx89mN0DXic/I= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706578560; a=rsa-sha256; cv=none; b=cXmVrJvp/fZjrrcxHnPQpIxQJhj+qeslNvN4uoCVWbidbLWAoRkJRdZOs3x0ZHVD97NuAA 5NIUNn9mLTlWoZLJJGO270YHDg6mTnMwHE945dGEEbdXEMe9JTSWD8YLHf9mwJBOE+sjAL 87jtwyiFh9j5y9WvX1F2DmmaVy1Du4Y= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ar1EzV9w; spf=pass (imf10.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 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 2C3C4625DE; Tue, 30 Jan 2024 01:35:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E7BFC43399; Tue, 30 Jan 2024 01:35:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706578558; bh=ZtqTd8FEkkcClpmqlfGDvu7x6/2aDbjjseJMMQvFCaw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ar1EzV9wNYgpLqVA34gUAYP+W08RR2XTVvtZgE00US0nj7kI9ZKC/9C//HPb7yjPx 1P28YQXu6KYnZhxlnPAyRzaD3EoOMiaVBemIcYC0xbUylzOSVORSSk6jrcjA1FOhz/ cG/tuWrU4q4wEt4TNO4bk6MHsQfTZPYx4olpMaknqtNkDxF1YAv8djDsfC/HMrnrXi TD5uvIub3mm3mocZ4dVFSt2/xzN6eCDURNSZ5UJDVTu0ij5WT0G5X/M1nyFryHy/Cx R9c83IgtwWEXPgx8V5U7cFDaq/ZC4y7Ubvj4D3sG0UMkDRG1ezz8rcDh6O1XpvtMVr VUSdhLduqygrw== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/9] mm/damon/dbgfs: implement deprecation notice file Date: Mon, 29 Jan 2024 17:35:42 -0800 Message-Id: <20240130013549.89538-4-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240130013549.89538-1-sj@kernel.org> References: <20240130013549.89538-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: E5423C0019 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: j9itjgpdazpekhfjmzxk18nu53yjgdhr X-HE-Tag: 1706578559-29023 X-HE-Meta: U2FsdGVkX1/kNdp3Ex3oeXD7/XTd7B+BGbdoweBhY9IJK7yAcDmgLjokLImk7G+o+s629zcsZB4q5ALIHvQS0lote/7McGzSPnLEoF0+D84oJ+v/Fr3YrU36C8YzGTWTsTY/fq4uYFp2XFavIS/Kl5bHc5qBaiYRbm0/w8nRRWFKQvXwATT62HdqM9X+5SVTVsh4DQwYfmVq6pytzC08OdpJhWz8LEIE5r+97h8PBhBCmWD2E/0fn+v7Hg/AH1GiFPwD5dYoI+5KXupef5lYUwq7agqN8p4B14H++XjzWcpltmmZmYpFXJ074oBrkjwK6+lXUaSton2SWG5WA9UfL0N3VGx3+Amo2Fv2/5aMcacGs7MPQTXJGadZGqwLMxbAwa5ooP3GUUtRkrogjd1WjaKS8DHvwBzegUYVnpKKhJgLnDKHqRj1k5W8B4WoYIsuEEGnblF/ktqU+Z6pc9Yrc1gQfhixeULrAXzYCq06sMMb+C2jv6ev3EHwYYrrIdaNdm54brox1Ltzn2rXtRFwjDTODp0mboghFhPI0QbNk86aNYm3eSVAkylL4KHsFMeJscfNG7a9FL9ki+z15zya/RRzrmwA7R8gIfE7qdK/bN1YLY2ryL/FPcDgPPZw+VGDq5M6E9qOZ7dZ9S/K+BiOAyDgny99EHuWz+spELvEyyVfl1MS/XOv9J1MQOFIMKV7GXqpVqk6FURPhI/iRZKEDPAZuZgNfoabPONN345eN2lqInG2zWxpDQQOH3V+3DQwhhyXZQOiQcRA5sorLaxeuCuJbtOQaGrIR0xONz2LIhLG5iJwP1qdJlQ7cSc0YpCkcugw3aE8SblB3CI0oblA3pVFf7frRf7NmZOGTt/cgmf5rMhuQnJLc0ZzI5DtyPRMWeQvNwUIWg4f2Yvws2xtcvk3CiQePPlFY0nX4rnrx3Rd36eOT6F7i5PgyR7/JWfiA6Gl2jEqIIYxq9nsCMx 2p9NAXVm i3GVGTMvosdLBT5dlAN8VRKUxa/1u9K1CgP9Ep76vVCKUVIg9+8Wb0LacRtCtWrd4lXuv50yBX0YyEKVmXnSIG0ebD4i5mI8Fc4A2YpzvZv/28jluTK1dDBFur148dgaTYb94OLYFvBMRrQS3kZcJH1On5G6yPvTWm7ZhyMfkiVnGvnZ37idml2675BTdUL1XcDYmDXoThQpmRMF+Ft9FVECKntmWLlpnvnftAq/HQTufGGFwqi+Vl7tZyX5ShyTCfR6T/OI5v8Pd8LN05KkEJeZeweYdvynkZVCZz1MO6u5fDvg= 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: Implement a read-only file for DAMON debugfs interface deprecation notice, to let users who manually read/write the DAMON debugfs files from their shell command line easily notice the fact. Signed-off-by: SeongJae Park --- mm/damon/dbgfs.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/mm/damon/dbgfs.c b/mm/damon/dbgfs.c index 7dac24e69e3b..fc6ece5a9f37 100644 --- a/mm/damon/dbgfs.c +++ b/mm/damon/dbgfs.c @@ -805,6 +805,18 @@ static void dbgfs_destroy_ctx(struct damon_ctx *ctx) damon_destroy_ctx(ctx); } +static ssize_t damon_dbgfs_deprecated_read(struct file *file, + char __user *buf, size_t count, loff_t *ppos) +{ + char kbuf[512] = "DAMON debugfs interface is deprecated, " + "so users should move to DAMON_SYSFS. If you cannot, " + "please report your usecase to damon@lists.linux.dev and " + "linux-mm@kvack.org.\n"; + int len = strnlen(kbuf, 1024); + + return simple_read_from_buffer(buf, count, ppos, kbuf, len); +} + /* * Make a context of @name and create a debugfs directory for it. * @@ -1056,6 +1068,10 @@ static int damon_dbgfs_static_file_open(struct inode *inode, struct file *file) return nonseekable_open(inode, file); } +static const struct file_operations deprecated_fops = { + .read = damon_dbgfs_deprecated_read, +}; + static const struct file_operations mk_contexts_fops = { .open = damon_dbgfs_static_file_open, .write = dbgfs_mk_context_write, @@ -1076,9 +1092,9 @@ static int __init __damon_dbgfs_init(void) { struct dentry *dbgfs_root; const char * const file_names[] = {"mk_contexts", "rm_contexts", - "monitor_on"}; + "monitor_on", "DEPRECATED"}; const struct file_operations *fops[] = {&mk_contexts_fops, - &rm_contexts_fops, &monitor_on_fops}; + &rm_contexts_fops, &monitor_on_fops, &deprecated_fops}; int i; dbgfs_root = debugfs_create_dir("damon", NULL); From patchwork Tue Jan 30 01:35: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: 13536658 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 57B28C47DA9 for ; Tue, 30 Jan 2024 01:36:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 821DB6B0096; Mon, 29 Jan 2024 20:36:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7A9E26B0099; Mon, 29 Jan 2024 20:36:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 671526B009B; Mon, 29 Jan 2024 20:36:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 28ADC6B0099 for ; Mon, 29 Jan 2024 20:36:02 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id F1152160B12 for ; Tue, 30 Jan 2024 01:36:01 +0000 (UTC) X-FDA: 81734261322.25.BDF743D Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf15.hostedemail.com (Postfix) with ESMTP id 66989A000C for ; Tue, 30 Jan 2024 01:36:00 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=HAAuZhTk; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 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=1706578560; 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=GYqOLNJHvqChvImZaDzafeF6/fUwF8ZZwtM6fSgwe3g=; b=K37iC25fRvlvpw4n1WB0/8Ott83NtnfvWMGN6kJ/LG827PsyRMMuBCPV0xo5meGZQTNFWs H0TsnfXME0+ulg6UhlyfT1mgxJTdQm2ZC/edbiE9jl5WOk4pSSyUE2VGgp8esQr+ZrlXHO MP7TyK7+QAyQsOki4LNv+GNTMh33fhs= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=HAAuZhTk; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf15.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706578560; a=rsa-sha256; cv=none; b=2e2QQi+7dC2qyg0rbaErnLOw1yAb3qVUZOebghEUBCQ6O0mvN7ysP/4aNAmxIXWPIkNXYj xPkrgf1CxJk1PtWMyhNrmEFKcRY35uFufnN/ZXYzfbIZGD5X+WB649j10lzXjtG/Vbc9qw gSdJZARnl/DgaJsF4Zg0dpeDKNbnSPQ= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 90D56625E4; Tue, 30 Jan 2024 01:35:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0964FC43330; Tue, 30 Jan 2024 01:35:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706578559; bh=OvMM8iJkFhvWNhsVLNub4HhcW21nuv8NW9IL6jHpWeY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HAAuZhTk9Ynq9mnYQP2Pkmcbpcd5Lg6BDiyjM+rZXnkWTHikCQS1p9FHvI24SkFhD ZdhKkrHuUzxpbRD/VtTqVpzP0p+HECcFBDoPaDHb5356mZzQC2joaa14LWsPrDuGfB lJoV1XYenWuoKc3znKqn8HLKPeKxHvYJtmWfopvS/Z5aAViVj17+6NmxfJVPcyDj8G Ue/aEGz9BUlxrfWlCSAOQD4ejnXtZXptj80MiSBKwxqs2FpaIehQdmnbmPE8ooRgT0 EvBuZRpWCsb/FbF4hz5ysYQZXWg85FXnwU0SECSbVZp7NPKKPdr50dZkyM2fr9o0lL gA1Iyha6cBm4A== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/9] mm/damon/dbgfs: make debugfs interface deprecation message a macro Date: Mon, 29 Jan 2024 17:35:43 -0800 Message-Id: <20240130013549.89538-5-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240130013549.89538-1-sj@kernel.org> References: <20240130013549.89538-1-sj@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: iqmq1ewcib7jmr6stqo93cfiet4gpwoj X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 66989A000C X-HE-Tag: 1706578560-346871 X-HE-Meta: U2FsdGVkX18MRHoue/A816WIdC/vLHBulqo6fLFUjjr2nAd1N1HK4wpN1JMrgZK+gtB03we7q6XgdIelWdseQZOhNe+gmnp5tVaMtRAtwU1X2/2mEzEPP7sZ9615vBIr9XbMQrgVvnXYQBnCPR7kBBaQYJosghesoaHu0oCSHTxpep5bOFCH+tbCwAUqP+Wyu6WCJzQaVA/q9oarKex2ERvXBTD9GLPtszbOdlqYjfM40eFmgPb48HisGY+Wf1M0VCFYrvo1oz9e+2419+p0LECGM7enfdU0RA6k7FKKcFnEZjKfXFe6sNk9NudQpY3mPrCHBxeVTjYFsIX8o+X8f4++84pKf/DxkonxHGcc4BUjk/y5fn7brRRiFRJzVzmc9Bt0UYBk02fKreUPfZgHwoHKYwHy9pEVUc0NUQVsM+DcOIaCpCCLoTGZ6f5ioiQOQJyck0Whub2i1NNxDLsTQgi0LZnO1ybtC+j9eFW61G0Zp3HAdaBwIIwEbXouTnznBNpwwIv72tee+xgka3JED3/dWTQs6EvSQCvdv4YXOx7PT9r6mV0Y48lzZrtopev0XXo4a6qPm9g4WubU1k56WoWPbYH9Unb3er5pSb5G7ZL5F2nlFhI2t6sef7wVnrf1f53PchC0Nq1cPkPsekymj34vNCqsLN0tjGXqPRvX9g2CVbf1niwHWapk7qB4tilSSsmCsQLPO+/XVNp0z8v1VcvuiF9+kLcJrpdGpXcd/h9s6kOSrHs2FZbmNE+VK3BWDfvVvLjsVGtuiHdERFrUlYwupU484x7sqBes2FiEuiyjmrR9uYYOkH7D1rr4KEebUHpbQC9WaCwGq6+ZMD5m4zBZmcy0oz5AspuW/c7Roe8LBeA8yQ+d1XtFGZcrYxTb51POlC3IhMjUyJdANY6mT7JdwXUnN+94YKOdfgQD6RTj0AFsyAZNwl7FxhUu943lj0KQahKtiGO/TCs8QjP MqfFTvud 3tGukDGsq1KjYRtv0TFGd5l99cmxUW82wfBC7Svx0a8+tGjakh9+90poW2p6atGncAhmK7AGI7qV8l+CSfP1s8hcBQK/yIImi/FE9sv+VcOM0DG7LExnf9/dRoc/WFXI8A7w8j+unypZBA8nqpgukdDps0Z5BSZTKHfT2ngebDW7se/NEeeYOQBPKMUMrT2UYo7e5DKyjg1MMsMF3brFPlB54ApM+bn0gdYG8DEhm5UjxDWTzqdUr7zM3QkvBBwejalFYdx0g4XwuMDT3GYabA+F/bsZZNx7si+qSTkLwyR09tdM= 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 debugfs interface deprecation message is written twice, once for the warning, and again for DEPRECATED file's read output. De-duplicate those by defining the message as a macro and reuse. Signed-off-by: SeongJae Park --- mm/damon/dbgfs.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/mm/damon/dbgfs.c b/mm/damon/dbgfs.c index fc6ece5a9f37..fbc0cd63f34c 100644 --- a/mm/damon/dbgfs.c +++ b/mm/damon/dbgfs.c @@ -15,6 +15,11 @@ #include #include +#define DAMON_DBGFS_DEPRECATION_NOTICE \ + "DAMON debugfs interface is deprecated, so users should move " \ + "to DAMON_SYSFS. If you cannot, please report your usecase to " \ + "damon@lists.linux.dev and linux-mm@kvack.org.\n" + static struct damon_ctx **dbgfs_ctxs; static int dbgfs_nr_ctxs; static struct dentry **dbgfs_dirs; @@ -22,10 +27,7 @@ static DEFINE_MUTEX(damon_dbgfs_lock); static void damon_dbgfs_warn_deprecation(void) { - pr_warn_once("DAMON debugfs interface is deprecated, " - "so users should move to DAMON_SYSFS. If you cannot, " - "please report your usecase to damon@lists.linux.dev and " - "linux-mm@kvack.org.\n"); + pr_warn_once(DAMON_DBGFS_DEPRECATION_NOTICE); } /* @@ -808,10 +810,7 @@ static void dbgfs_destroy_ctx(struct damon_ctx *ctx) static ssize_t damon_dbgfs_deprecated_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { - char kbuf[512] = "DAMON debugfs interface is deprecated, " - "so users should move to DAMON_SYSFS. If you cannot, " - "please report your usecase to damon@lists.linux.dev and " - "linux-mm@kvack.org.\n"; + char kbuf[512] = DAMON_DBGFS_DEPRECATION_NOTICE; int len = strnlen(kbuf, 1024); return simple_read_from_buffer(buf, count, ppos, kbuf, len); From patchwork Tue Jan 30 01:35: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: 13536659 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 B1157C47DB3 for ; Tue, 30 Jan 2024 01:36:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 169B66B009B; Mon, 29 Jan 2024 20:36:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1191B6B009C; Mon, 29 Jan 2024 20:36:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DA8DB6B009D; Mon, 29 Jan 2024 20:36:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id BEF556B009B for ; Mon, 29 Jan 2024 20:36:02 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 9C17AA010E for ; Tue, 30 Jan 2024 01:36:02 +0000 (UTC) X-FDA: 81734261364.19.A5BC1B4 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf27.hostedemail.com (Postfix) with ESMTP id EF5BA40011 for ; Tue, 30 Jan 2024 01:36:00 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=jn2kAJ64; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf27.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 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=1706578561; 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=TiqnJbNWgCiHv+i0MWoxbS4Se8F+bil1/y+IujP2iuE=; b=QNY4yO6X22tyTyWtGcYEsoxQj69QKn2dbO7Byl12LRVGHO1Zl4cHAex425H3vJp7nCjwrW Cn+oVz+CR9bQMmO5c530nBdPgK0NmA7desVyxA13vQ1v+GYV9lq5+xIidcTMyf14XyBZz+ 2M16hulhfOJJZaWxIvG6PNW0c/IQG04= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=jn2kAJ64; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf27.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706578561; a=rsa-sha256; cv=none; b=rJiZ+/aYo94FuppR2XsP111NRKhuoBdXkrSwwqgYZt1uoOFtK9A37bR7x913C15DB5eavJ iLLizU4M0QRqAnCxo0QFJUf5TUv8UTvDzA0AKmtObkwIIt1dTiDO5znQwywzcINBEUfC+Z XjKYKjoUCguBzRX4H94OgoJlOVWsLLs= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 4A710625F4; Tue, 30 Jan 2024 01:36:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95812C433F1; Tue, 30 Jan 2024 01:35:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706578560; bh=QwFDGVTfCJQhExDgwMfhXxVfZDEJjE7tnYoyx4MeyPs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jn2kAJ64jX3y9uusBNQba+8eCKSt8+re6HtxCuT5lrz8GaEdHb/UDdbWUpFsPzV/H qz9NZmQUntd0hZVO21XYjgv5CulXkKXa1O3jOq+SOTjHYkQPGs5Z7gf2GqIKPD+yKl iOD7bi+o09rntjgPn52bdOchOVvTPPkZReLtosLJjkRWtCucPbKLvg722vug2eMmzf l2sU6+rEU+zLPTVEp/xH672L+9wm4bi9gJTkNDgun/kFVGHKk7BgFj66SwQAO2DrT1 Oy9yNc01U5/dhyvG4zc1Imxbsn34vWm0UxdP8/0c60W1c2B9PYIfyCs5JFE7YVsAHp gv8DmsSs+ANKQ== 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/9] Docs/admin-guide/mm/damon/usage: document 'DEPRECATED' file of DAMON debugfs interface Date: Mon, 29 Jan 2024 17:35:44 -0800 Message-Id: <20240130013549.89538-6-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240130013549.89538-1-sj@kernel.org> References: <20240130013549.89538-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: EF5BA40011 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 7cz6664rubhw18864p3j897juxtywpnk X-HE-Tag: 1706578560-456923 X-HE-Meta: U2FsdGVkX1/CqIRzS71L89YCqzvUXGSVIUEYtCno980gMmjdFvXKVIpURBmU8kr4o3hLuq4FwCKHCnPbGvq+J8atsJ+8H6qAAeO30riGFWSyP1CmfDQCrm+8KqbAY47OzDtLdg7Xyf7EY/dh/ZHnRkNUYADDr1p2p0USwOwzXiIWKG0macOs05uHwICB2a5WMMRztjhN04Dhc+q6rLkPiLnfKIh/4AekVlzRmAIVhK8IqrBBJucIdYNGF4XFmB+gDkav/BWbfHwub59gm1G4/LlPqHR05wJbgM6pQregJGB4CoSVwHMQf6I6j0vu8/z0xkS91mqwKRm1VFtVS76QrKZ6tAnGYYbF5fdMiZMI2EtXNLTnTmW7S62ql8oVGWLf47quMuVaOaj/kPDPjGdCRU7jsWo5ah/nP1RgAoJaqc5vqsYJPGURM4AeajlOvBVg4NeMIvh1lnyMZC15eEnCJShYrI4TH02PFC4R809Wfz8HsS4VMgynHDo/Nfy3TS49mjJjddx7gX3RUcfHecGnnOToXgLlmJP8yd0b6lfpClHbFzTm5OsUuhi4YivGJPccsU1oKaLxhshrbUs7aTT8VG4XQ3DffcUyXtF24yodaVA30UJ6Gl8JMFhz7AmZA05+jkTW8EQq7UHO1j0Un3bmW2bzqwVYMtARH+vHwRD8ADW4hwBGlZ9i/8X3JsiguqDGAKWMuEBNJ5XCuTrcmj6WMYwhrN9lZR+puc07NYVtzBDMBbGrs0L/6ZQgHxvu77JUqV6Y7eOPnqZ+XTotQZe/og/7555uTAXSVAokZCkOIjkHOHchpJ/Uh9WHwfu2fAUWWiFRmtVBc32aofDZj0a9Y3S6ukUYBt6EhN7ZeQyJdkgj2dSJ/Xa3ucQCeHyLZnNp+Kbr4eCR3kW+WNwI2Gah9o5zeKLvd8zD0QmY6J/5rkvCcO7Ksoy173HJlvBPmSlEtpxYDVgbSyfqO0RIwJb nvFUuNH/ DJOq+0q3iNbZDuLKzdQ27CaP2gzFd3e9Eo+1ef52L0ARP2Fis2FPGHDH0pCPrl4fKvQXPZIQnqyQzF0qbTAgZ20YQwXnu5R3aPh8vkNgV7VBunrO331IOCNSgLvYoMdQJ/GQy50SYF8/JjbhnbZ5kovAr1MhozFOgV2fuJTQUIQpUaA4Pe6t3K4aETK01Py7UZda55qW+bpP5iT4OvAP6DhSEjQRgUgqg6arxbvKmzCTIeqvljq4t0EAm5JvsD09YxRHwBwLAlKtTCW5nRPvvy4mX+aFUkLMbgu1CQ78heMACPTY= 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: Document the newly added DAMON debugfs interface deprecation notice file on the usage document. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index f2feabb4bd35..5d3df18dfb9f 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -628,9 +628,16 @@ debugfs Interface (DEPRECATED!) move, please report your usecase to damon@lists.linux.dev and linux-mm@kvack.org. -DAMON exports eight files, ``attrs``, ``target_ids``, ``init_regions``, -``schemes``, ``monitor_on``, ``kdamond_pid``, ``mk_contexts`` and -``rm_contexts`` under its debugfs directory, ``/damon/``. +DAMON exports nine files, ``DEPRECATED``, ``attrs``, ``target_ids``, +``init_regions``, ``schemes``, ``monitor_on``, ``kdamond_pid``, ``mk_contexts`` +and ``rm_contexts`` under its debugfs directory, ``/damon/``. + + +``DEPRECATED`` is a read-only file for the DAMON debugfs interface deprecation +notice. Reading it returns the deprecation notice, as below:: + + # cat DEPRECATED + DAMON debugfs interface is deprecated, so users should move to DAMON_SYSFS. If you cannot, please report your usecase to damon@lists.linux.dev and linux-mm@kvack.org. Attributes From patchwork Tue Jan 30 01:35: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: 13536663 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 0D011C47DB3 for ; Tue, 30 Jan 2024 01:36:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 07FED6B00A0; Mon, 29 Jan 2024 20:36:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 02DEF6B00A1; Mon, 29 Jan 2024 20:36:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DC5766B00A2; Mon, 29 Jan 2024 20:36:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id C3EE46B00A0 for ; Mon, 29 Jan 2024 20:36:06 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 952AC1C0AF1 for ; Tue, 30 Jan 2024 01:36:06 +0000 (UTC) X-FDA: 81734261532.21.3DAC718 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf22.hostedemail.com (Postfix) with ESMTP id 79B60C001A for ; Tue, 30 Jan 2024 01:36:04 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=FFP5NFEw; spf=pass (imf22.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=1706578565; 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=ePn71CF+5khVDS2ZdjmxVHfkUk7BTWUPIbvLbDcmGSk=; b=YRBxfHrdT8OpJXZQW3IY+YLFwEJ36+skPxBxYcS7OIEcSCFbdwRXCRIcnfx9kOhhxX5reb nLujR8daKEXw3xZXP91JJEydsrmULkYzSD0KZ66nwBErT0bPYgzLxZVhW7Upi+PKuvqtHL a7iU4VbMppOJwjsqPk/467vknhtssA0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706578565; a=rsa-sha256; cv=none; b=EhNsiaIboiPVruUqj1jdm5KrrhhzvwHMVaDdRwHhcwQMv/vHrVhTWR9Qibm0lX4A3mqJRR XxXjNCTLUzI4QixO/frbqzMjF9cninT1H4N8/B5BzFOnoF07jZiHrh0pGNKXONk80/fBOU 7GandZNRBM7uf6YKeHjS8VyW2DX9FZ8= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=FFP5NFEw; spf=pass (imf22.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 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 8BA98CE1787; Tue, 30 Jan 2024 01:36:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4EFE5C43390; Tue, 30 Jan 2024 01:36:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706578560; bh=TappCEs1QiYT505+DhU0zSdNYL81quzZAEnLH6jY5LM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FFP5NFEwwozb08uVo+7nRDp7jigTnADRzHoD+Dy+L61NqdYWr+6phTtrauODwooAb 24tlphXSd5ldl6GdqunuS3hAvvajyCkKiYqyMAUnafFNPGzD8RpSmmKEEpedkpMaKb rk95qqTgwffbKqfnE2aiupjub6g61Ew5jAJrhlWW1e19S9dEhv27qrVbFiSO0IHNvc eTR/lirtG9EvJbGftZc5q6DTflhxF/CmWvc9YokRAgPTvwpvkT3YI4gVashAmj7BdP iboBri8jUHSZ9GFXgaMQWViP3epe2I6gYgm35prRmu9psnS7Kar+u0Vnil+VIFEnDI 3z4WulC2vtuRQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Shuah Khan , damon@lists.linux.dev, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/9] selftets/damon: prepare for monitor_on file renaming Date: Mon, 29 Jan 2024 17:35:45 -0800 Message-Id: <20240130013549.89538-7-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240130013549.89538-1-sj@kernel.org> References: <20240130013549.89538-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 79B60C001A X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 516mizfoeqz833kaud7donp15g6hmcdc X-HE-Tag: 1706578564-399932 X-HE-Meta: U2FsdGVkX1881nFgLjp6meoto5u+dtXxW0JrVXl43ZbTEMuLuhdbtzhY8xzprFE9PlzDSD02MTItiS4LJl/KYnkq7kyq5wPRZ1YyLxIzXT9GTISpc3Z3XCVLpi6Cq/TEpNB0QODgdTNoXd9gFz6Hq14qmw5Rfc+J4BQrbIexYqy7y/Qm2RmPell+knz0TPTZMUWnm76bOTqwdDPDM133FbYmPHpcqAy6/xiz0Tp18CwrfC/1GVRXWDcJKF6vekyaQBUhAoHN/GE0LEEIqDRwTWIxK0hY75mnzOAzuueeHDRbwxL6rZUZ87wJOy1fBbM6FUSS40DyrnzRsnBu35Zz63lDCjm/js3jCvZLHRIXlf6OJVusXlX+KZ9EZc90cu1CrKnzcVT0tjsJrhYYw7jzOomSrp4AtPKGXIHuBzYTQua/PHklri4rQZ6knHsom56a6o5LSvGy843QdRX++SYi4aW4wdwBFwxNyz9Md59+LGV+5tc0V38u2620Gy1Baycp8nWRPD0N+ZpOtwBSQjcpNld1xtErXdL/pB69q24xPnbIIGOhvwqYh14pDg7V29E1DRYr8HTXJztpm7/GkgCHG/PvhW1DctXcAr7ToeIda8z6G1IP+is06NL174bhiyGGpn7fTZBY/R4tHJpRa7Lg60ySpdWm5TbheqprO7Gyxd89Ponj9axudt2LhMf4G/p4elceaEOZj1sSrxOQTGqeClqaYsgZx304s/7O26bV27srEiu1LgOtFpeJLVAG1Yxu6nC5m1v2333i1jPxeyuN9pFTlwwfuRYVELH4tg2hkMvolX8t5bduZ8fy3y64oefFrqy5nbUS/NomdNNBwbew/Y+AnLc0l3Aas/kn3NRiEAK4zQInJQ/8rMrYMHW1fOBzM/sKEaqh5GidunRJDC+QUeRdbqALU5jNVdGbnJ2SmW1FI3K7QGSNIs8iGZUZKk3eGhFzctYWBc2baR22d29 RNB/VsYt +Y5IX 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: Following change will rename 'monitor_on' DAMON debugfs file to 'monitor_on_DEPRECATED', to make the deprecation unignorable in runtime. Since it could make DAMON selftests fail and disturb future bisects, update DAMON selftests to support the change. Signed-off-by: SeongJae Park --- tools/testing/selftests/damon/_chk_dependency.sh | 11 +++++++++-- tools/testing/selftests/damon/_debugfs_common.sh | 7 +++++++ .../testing/selftests/damon/debugfs_empty_targets.sh | 12 ++++++++++-- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/damon/_chk_dependency.sh b/tools/testing/selftests/damon/_chk_dependency.sh index 0328ac0b5a5e..350f8c2b071d 100644 --- a/tools/testing/selftests/damon/_chk_dependency.sh +++ b/tools/testing/selftests/damon/_chk_dependency.sh @@ -18,7 +18,14 @@ then exit $ksft_skip fi -for f in attrs target_ids monitor_on +if [ -f "$DBGFS/monitor_on_DEPRECATED" ] +then + monitor_on_file="monitor_on_DEPRECATED" +else + monitor_on_file="monitor_on" +fi + +for f in attrs target_ids "$monitor_on_file" do if [ ! -f "$DBGFS/$f" ] then @@ -28,7 +35,7 @@ do done permission_error="Operation not permitted" -for f in attrs target_ids monitor_on +for f in attrs target_ids "$monitor_on_file" do status=$( cat "$DBGFS/$f" 2>&1 ) if [ "${status#*$permission_error}" != "$status" ]; then diff --git a/tools/testing/selftests/damon/_debugfs_common.sh b/tools/testing/selftests/damon/_debugfs_common.sh index 48989d4813ae..aa995516870b 100644 --- a/tools/testing/selftests/damon/_debugfs_common.sh +++ b/tools/testing/selftests/damon/_debugfs_common.sh @@ -45,6 +45,13 @@ test_content() { source ./_chk_dependency.sh damon_onoff="$DBGFS/monitor_on" +if [ -f "$DBGFS/monitor_on_DEPRECATED" ] +then + damon_onoff="$DBGFS/monitor_on_DEPRECATED" +else + damon_onoff="$DBGFS/monitor_on" +fi + if [ $(cat "$damon_onoff") = "on" ] then echo "monitoring is on" diff --git a/tools/testing/selftests/damon/debugfs_empty_targets.sh b/tools/testing/selftests/damon/debugfs_empty_targets.sh index 87aff8083822..effbea33dc16 100755 --- a/tools/testing/selftests/damon/debugfs_empty_targets.sh +++ b/tools/testing/selftests/damon/debugfs_empty_targets.sh @@ -8,6 +8,14 @@ source _debugfs_common.sh orig_target_ids=$(cat "$DBGFS/target_ids") echo "" > "$DBGFS/target_ids" -orig_monitor_on=$(cat "$DBGFS/monitor_on") -test_write_fail "$DBGFS/monitor_on" "on" "orig_monitor_on" "empty target ids" + +if [ -f "$DBGFS/monitor_on_DEPRECATED" ] +then + monitor_on_file="$DBGFS/monitor_on_DEPRECATED" +else + monitor_on_file="$DBGFS/monitor_on" +fi + +orig_monitor_on=$(cat "$monitor_on_file") +test_write_fail "$monitor_on_file" "on" "orig_monitor_on" "empty target ids" echo "$orig_target_ids" > "$DBGFS/target_ids" From patchwork Tue Jan 30 01:35: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: 13536661 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 D52E3C47DA9 for ; Tue, 30 Jan 2024 01:36:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7F9B96B009D; Mon, 29 Jan 2024 20:36:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7AA3A6B009E; Mon, 29 Jan 2024 20:36:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 64A346B009F; Mon, 29 Jan 2024 20:36:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 469446B009D for ; Mon, 29 Jan 2024 20:36:04 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 1FAAC1C145C for ; Tue, 30 Jan 2024 01:36:04 +0000 (UTC) X-FDA: 81734261448.10.C5D6C8B Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf06.hostedemail.com (Postfix) with ESMTP id 87E3D18001D for ; Tue, 30 Jan 2024 01:36:02 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=U70W3FmG; spf=pass (imf06.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=1706578562; a=rsa-sha256; cv=none; b=JmVc/dHwO8uqzfX/cbzj730vFJ/MUa4zJS0Hzn9bHi351SqnvwvbLd7TW1PW8a3sNwRsS4 +70afwfS5s5uG2zzo+DbxX/LNVFwamngpfQmXbpcljPl8gsTnjU3m4DZldKvgz5k6oZb4B NQdr3vsQsf37y9RK3c0BWbkGrngdBhc= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=U70W3FmG; spf=pass (imf06.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=1706578562; 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=JZ9nRYmUd2LKEQFqpzPE3bK5iXZnlL1JMbCz7lLmhrk=; b=OrywGgA4g1uQkr4/k+CFbhyU7XnB2ryOgGk8FcI6AC+dieME1yytKboPyZkTbLeZeAPRPv 0fT9l0kC5Ifskq6vxzNg8lY4fbVgIQYxdvIkmfsbDkjMjbMC0AbcYlhMoxMWJ77JIOBFSZ nW5C/iYkuiy9sj1bAJsVwSlf2wa3vhI= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B585C62632; Tue, 30 Jan 2024 01:36:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 088C5C43143; Tue, 30 Jan 2024 01:36:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706578561; bh=6XVXKH5SHkCRbfNXw+ACfRyxafwIyett+q0yka+zTjo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U70W3FmGU7i5j5k+6FsO/9Kid8M057PLCj+ZqfqXtFpo2kZarzQkd/flxN8967gcy BO5hanenOLhNlpphcmPg8RgJSHXXVq4VWja4IuUlW+BfXiZO8Xw/WxMr9JoENbpPnY 41z+vRNmkYfoWWXOrYWap8yCizoBFjDT0UEhuTvvvUfOzE0NI2B8VzBW/kKzsi2CkP 8lT/oGQKMqaNivBOVAl1nQ5gOPaEUS0+qJTmd8BKagGH9QJVjSVX25MZ3Fwj8OTm1Q KPMztpTPLxUeHrinN56K11jl8ae4cYwPXuSh0FywWB0wpLls7aEzSo8bx51ThXDANj +WE+4TPfYD/WA== 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/9] mm/damon/dbgfs: rename monitor_on file to monitor_on_DEPRECATED Date: Mon, 29 Jan 2024 17:35:46 -0800 Message-Id: <20240130013549.89538-8-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240130013549.89538-1-sj@kernel.org> References: <20240130013549.89538-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 87E3D18001D X-Stat-Signature: nrkde9rinx6nakfabxcgp5n8uahpd6op X-Rspam-User: X-HE-Tag: 1706578562-975905 X-HE-Meta: U2FsdGVkX19h8A5Xf07gz9rFXce2aK/4I6l3PmicmnjaVChTTQTGmqdwYhHKw0KLpkmAxKfpKGCvRdxVky0698ZVn5iIB2bNJ50N8DYzPx4GeeHcota6ILmK956CBtEe4/gKdRasGULtig9lWZEwAaPkneKXGx758VOdXLgp3+p0Mc54PCIu2ag4ZJNlY3B013m1iKq4/73iUWmcmzaZqL74CiXAjUaD/bwhuijMgx+iW+z4ifWrpeLcPa7N2XP7nKKFH5s0fe4RSFfSAUZerxKTdfNI0v/Zh0X+IYzhnIEZKBNkU/hOaqwmoTK59jxLsrGUaFXymBsXmAeIRkcavDvKIpUV682cJFP3GbUnTHu3qN/k2zBzxN51x7DasVelp953e7djlL5VQt1x3frFWRzsewaU+z7nd+QClDNVAm10z7+KowlPuRBV3zsSKON5MkVf82YsYuL1YyhziBdeUJnIasgnkUIvPeO4O1S+EhaLMOzZJaLjoSv8mrZ0WW2uhrRswE1v0VwI648hDQZQg7Z924vS6vox1oH1Eea1j7UXytG6WILxAX7x2fUBcqpGtzWqOnHNhPyl23UWrkT1ua1X8p3UIfAe5JZE7zUP7DrItQj1i2YVk2ZuhFyfnxbe0Px79cZkhw0DnPLZf88G5Pbx9e7JmlrFQ4nMHtoyyx0gvOV1GAsxrCNlYpJDQgBaq/IsfdIEZ4S1oYpF65SsLVABm5jxohiTFXgVc9APiv0ae05IbGyzcEpPSZLN+XKfllMkAzsfeAr4VXHSZvhbWXTWCcx26fd8+E/NrydcizLxreVvFsJuZScmo/9tDzttGGK743ghEU9lT8IZTiwrwWBVyyfRvnJlXqdtXXXY500VTXsX6seeEAdm4g/2BV/qbPyliI8shZyNNxhGfS4YsikOsR28lAVE7S0P7a1eTJp5ER0BmUCLCYl1m8vrL9hpuGECK8CNvExABf0cOIb YuKVmbj5 Js89Dnna+EkrVyjbMP+ycR/CsjEwHZc1CRT52rOH+1nE/MUWFaeoGDe0FsZL7xk1hef5wY5Z6GG/VJcPOpk/l3vhZRgJ73+Sqw4qrZ3m7ai41uuP2IEbLD2dZRnGdru+RRDVtOQ6ovdd+gxtDXae+Iy4VJC9W8Dn/n+a9lUGD2pu/UDQYun2tVJZ8Tlrm+31o/qltmryjFmYFanyb+q6HLFiEPg2RF9AiYcpTxwiyhsdpgkVBJ7bzexfERekCR8tbNN/kizy2r/CGxYNmqeOOYbKJ941DMLXLpJMKSoyyfocL4OnwHlxQy2cgjg== 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: Kernel builders could silently enable CONFIG_DAMON_DBGFS_DEPRECATED. Users who manually check the files under the DAMON debugfs directory could notice the deprecation owing to the 'DEPRECATED' DAMON debugfs file, but there could be users who doesn't manually check the files. Make the deprecation cannot be ignored in the case by renaming 'monitor_on' file, which is essential for real use of DAMON on runtime, to 'monitor_on_DEPRECATED'. Still users who control DAMON via only user-space tool could ignore the deprecation, but that's what the tool developers should take care of. DAMON user-space tool, damo, has also made a change[1] for the purpose. [1] commit 935dae76f2aee ("_damon_args: Rename --damon_interface to --damon_interface_DEPRECATED") of https://github.com/awslabs/damo Signed-off-by: SeongJae Park --- mm/damon/dbgfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/damon/dbgfs.c b/mm/damon/dbgfs.c index fbc0cd63f34c..f7abbc0633aa 100644 --- a/mm/damon/dbgfs.c +++ b/mm/damon/dbgfs.c @@ -1091,7 +1091,7 @@ static int __init __damon_dbgfs_init(void) { struct dentry *dbgfs_root; const char * const file_names[] = {"mk_contexts", "rm_contexts", - "monitor_on", "DEPRECATED"}; + "monitor_on_DEPRECATED", "DEPRECATED"}; const struct file_operations *fops[] = {&mk_contexts_fops, &rm_contexts_fops, &monitor_on_fops, &deprecated_fops}; int i; From patchwork Tue Jan 30 01:35:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13536662 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 6F611C47DB3 for ; Tue, 30 Jan 2024 01:36:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EAEF96B009E; Mon, 29 Jan 2024 20:36:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E12806B009F; Mon, 29 Jan 2024 20:36:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C649C6B00A0; Mon, 29 Jan 2024 20:36:04 -0500 (EST) 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 AE9416B009E for ; Mon, 29 Jan 2024 20:36:04 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 9112AA19DF for ; Tue, 30 Jan 2024 01:36:04 +0000 (UTC) X-FDA: 81734261448.06.2C53D6F Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf15.hostedemail.com (Postfix) with ESMTP id EA80BA0007 for ; Tue, 30 Jan 2024 01:36:02 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=DTmLfjtG; spf=pass (imf15.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=1706578563; 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=iWu7WAEyRELmGhhGE8LMUQxtmurcGMJa0kUz/u26pBE=; b=xf8s073n+dadEFk806T558SPVXRaIH/tedcihtFEhI/gvK433auyLUYwc6DsQvmBFrcixR bsQ8S7FLH7Kw0C3bmXczT+lCfvDwa3STddo3KupKkUO80iUiuIZXU8AJNYQ0u+qc9DFKVa VtI/tC3KDW/ofIqHCvAnM7+XxremDtU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706578563; a=rsa-sha256; cv=none; b=A3suqFdNWm0zJw7ZsdyHVpsifE2FAjiiSSohPYq/WTGsRmfY/jbnPsOR5Ky5XIaImg58+3 zoVJnHwDbciPig5RspXP7HcEq6XmAHNqLfT3f2/KnVsaKmGFZ1V6B0txyAXGxbkc7B1RXV hum7dWxQbpo+d4VxyTvGsRB4Ju1w9M4= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=DTmLfjtG; spf=pass (imf15.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 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 4C42962278; Tue, 30 Jan 2024 01:36:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95AE4C43399; Tue, 30 Jan 2024 01:36:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706578562; bh=gcC9dmoQX9j+tKrb8TrQMZADNHfkIGHlBl+HK47V+ww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DTmLfjtG2USxU7mvIhukf5t+rtNA8FRgHeVMxqey89fB+cw41bjtbJ0ueFc38YwMG 1GZRhvbIf8nTIBUWdJNAhYNnK4dDfMcibwZaDavmibS4wMMyapIrWDLAvXdUdwneWl ev39nvyIALH6/rtT4PyCtZHilUMxBH6g9myOiTK+t5TsP+hnfNQGUsmEncCI/ikxjg 7lQHveRVvEGITbaaGBHa3V3zlNBd7Je7mb2udpOJ+wZpXpegjej8rse/u3SpKAta3c bHEd2Xd4CnXuF3foqFXqLXiSLMsM0sX5S86kR2MIhHmmgTW4nOOcfuguf7K7YIdU6f 4wg1U09cC5rGA== 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 8/9] Docs/admin-guide/mm/damon/usage: update for monitor_on renaming Date: Mon, 29 Jan 2024 17:35:47 -0800 Message-Id: <20240130013549.89538-9-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240130013549.89538-1-sj@kernel.org> References: <20240130013549.89538-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: EA80BA0007 X-Rspam-User: X-Stat-Signature: msjxrkf1yxrfopgb41udgz538cgzr8ri X-Rspamd-Server: rspam03 X-HE-Tag: 1706578562-127389 X-HE-Meta: U2FsdGVkX197MKGxJfv2ASPoSaxVpYywecazKAqjHdnC4RtBqgZ5P5NbqxqUp48TFuM2gsC4kcbjsIa/mbFpcP8SFJWpbLYg9Z7eu749TSLs1NLXa+xYVsnCTW31lIQvmjiZcPRNaciJG1Mdh4zsYNUdkbs0+6MIocEO6K3w52cS1nVbTpstl4BHAEmuqvgjGS4j7j/LJnPKnQjb6foA1GjPloNdpD6K/UYfwZw6x2RSb/80z7n4iminXnEeueXpSrb24h+QjVnY3ZjeQDSYap8pjxHPj8tnxBydK8DdJYIy4y47dfN0LNG7BTnntit8yTw2GemDeW0gs8kpzRVqOulwQYch2faVFRL7LMJBaEgK3n2ni1gWxY0IzgOspBxQbiK4cWGexjLiiAlFW+UUa4FeHU8OTjzgYaUyFA+RVec926JiaOXjfifkRVcBAXsEeSWhdupBJjdEsob4JsV3KxN0FaAoEAMgGzHYlP8pSufl4+g9BsaOvu+xSABcUofZ2+v3OTj2UUZpuqatoS9isBiRsyqhEWjrYoCYWBzqYkjZWARguStlT5EJLho/qsNRL8mAuno1n2LioejekD1JwXOSDGVFrFIdrs5MHcI8jZ5gU/L9iQSh0GGeI8oJSgdXVb0tOZGTPPo8gRGnKEntyOHbvEDI5LJHEjosxuUkzppdpGRedMUmfCUmtKaPrsgJxb9Ttlczox+18B6dzKwVD+BYRGeRkLDen0kr9HyM1oeF405peggYVdXxwkuW3um42RGV73msKqJHFX7WnSJZAzKxiNkONGJnyrLnj5OF4rZdMCcdNH8FkzUkXBtn/nis0vzIHRjV+enfEy1VgWDbX0SKFqaSlfLsIu5Arm0GmDe5YgarU1OF/ZwC8zljjEYnaRydH/3+SSIUOt1Yl0Sb8NA/gE7oQqBP0vwS4yckunsn7nnCTaNP8owtk/ZCWXhEUqj06UGwVip8/yyE5oU jBPsUFa7 5WeHkKxRw+UIb4L0kiBKbhym08mqNc9yu4vjjujQIIPME9HlpDKFsM9h/yZYLEJaG7sewOzbYTba+ipGNto33kFC7zKk6bqvMY6XPS5ETHKcVuxz/bWhDFYpIfT9co9TV19Mvt1KkqqI8zRC33iiBIsMVL72ZjKe53Y1pj79zka6PquMoSMuNgpNbx+7SFSC1+GFOJaxgsEqsxwknKOe0qLBwzcVcSLs6HUvpllOzjim0bRIRtAdhfWnSc0qEw7MiLA3XfEQ+AuX8N45Fvs6XOFIYMDMGEuEHrURMvQpKjdVifwuSQPgIiE+bbyJH4NKq1zuEF+P+3cB7/zGliUNpYlw8QN/nu2K+XQ9h 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 debugfs interface sections on the usage document to reflect the fact that 'monitor_on' file has renamed to 'monitor_on_DEPRECATED'. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 29 ++++++++++---------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 5d3df18dfb9f..58c34e66b31b 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -629,8 +629,9 @@ debugfs Interface (DEPRECATED!) linux-mm@kvack.org. DAMON exports nine files, ``DEPRECATED``, ``attrs``, ``target_ids``, -``init_regions``, ``schemes``, ``monitor_on``, ``kdamond_pid``, ``mk_contexts`` -and ``rm_contexts`` under its debugfs directory, ``/damon/``. +``init_regions``, ``schemes``, ``monitor_on_DEPRECATED``, ``kdamond_pid``, +``mk_contexts`` and ``rm_contexts`` under its debugfs directory, +``/damon/``. ``DEPRECATED`` is a read-only file for the DAMON debugfs interface deprecation @@ -855,16 +856,16 @@ Turning On/Off Setting the files as described above doesn't incur effect unless you explicitly start the monitoring. You can start, stop, and check the current status of the -monitoring by writing to and reading from the ``monitor_on`` file. Writing -``on`` to the file starts the monitoring of the targets with the attributes. -Writing ``off`` to the file stops those. DAMON also stops if every target -process is terminated. Below example commands turn on, off, and check the -status of DAMON:: +monitoring by writing to and reading from the ``monitor_on_DEPRECATED`` file. +Writing ``on`` to the file starts the monitoring of the targets with the +attributes. Writing ``off`` to the file stops those. DAMON also stops if +every target process is terminated. Below example commands turn on, off, and +check the status of DAMON:: # cd /damon - # echo on > monitor_on - # echo off > monitor_on - # cat monitor_on + # echo on > monitor_on_DEPRECATED + # echo off > monitor_on_DEPRECATED + # cat monitor_on_DEPRECATED off Please note that you cannot write to the above-mentioned debugfs files while @@ -880,11 +881,11 @@ can get the pid of the thread by reading the ``kdamond_pid`` file. When the monitoring is turned off, reading the file returns ``none``. :: # cd /damon - # cat monitor_on + # cat monitor_on_DEPRECATED off # cat kdamond_pid none - # echo on > monitor_on + # echo on > monitor_on_DEPRECATED # cat kdamond_pid 18594 @@ -914,5 +915,5 @@ directory by putting the name of the context to the ``rm_contexts`` file. :: # ls foo # ls: cannot access 'foo': No such file or directory -Note that ``mk_contexts``, ``rm_contexts``, and ``monitor_on`` files are in the -root directory only. +Note that ``mk_contexts``, ``rm_contexts``, and ``monitor_on_DEPRECATED`` files +are in the root directory only.