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: 193787 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp943412dyb; Mon, 29 Jan 2024 17:47:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHXb/aWHhfJHN+z45+sTD3yeIz5gIK+7Rwhv51nNyxp6EgJAr1WgBg0KbDQMJGnIHRVfWOl X-Received: by 2002:a17:906:4ed9:b0:a35:bf32:8ce4 with SMTP id i25-20020a1709064ed900b00a35bf328ce4mr2799715ejv.52.1706579248738; Mon, 29 Jan 2024 17:47:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706579248; cv=pass; d=google.com; s=arc-20160816; b=jYaqaGqf34qDTxX1YSQXgMWWDw6AltcbqBXgCn7fzU4J0/dBHLUvSY3kui0D1wrwe5 SLZx7lF80QkptGDdVN+z3DT9xq/C+OHLiF35PI7Ge7XBMoMTci12Eabt8S4OnrDUuU2u b5zfY2iQDoFETKyrbKRGTnShwsv3DCEba9ZGtyyho+x/dEZnycRYWTt2WsQrjWvWHwUs UReDNIvppJ29atqrPa7+NxtevYEqWr9H8vAhFAMKvKtwSIT25M9YPtQgq1yjkXTjfNIN kxKiX87jQhoN6dFwXdvFqzpL0tVlrInVkXht5Zgg4oHDYrcwgeaX4HybBtf4QYR9gf7D QD5g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=UzC8ulRKhx2TkCWNSpXrkL8CCPSSFTRwD3zm/bCozXE=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=iQYttAYGBC4NO+/XG7dHeCzaoFt6vt6hKv/bE4pmeBxuGYfzRrcq5WwmbAyr1W96cG e2FzH47UM7mn57Wgp5PCk4KGPkX5uifqvdvkGrO2HiI8Ft4S3YRtYRfC/oLFVPcafPNr KBSyRNtUyVa2N4yo5SwYPhYCqlGyujp6ewFUUUb4jVQaZFgSCJj1xrzrWg80E7P1ibUc fgDi2ahDzkNeFfhnndymqZNGdQGagad6hv5XJHdIQ5/hNLHn+LpuFjHdaC0R72JZGdRo zc+cmPFCFv/+4MbTr1bOYZdkjISIRtvTSlMM1OZ3eTKEyheVxbeOHcGK2pKow4PV8ke5 sUFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TyTGrLjQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43721-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43721-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gz22-20020a170906f2d600b00a3522e960d0si3467164ejb.54.2024.01.29.17.47.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 17:47:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43721-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TyTGrLjQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43721-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43721-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 47CCC1F24917 for ; Tue, 30 Jan 2024 01:36:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C40E737163; Tue, 30 Jan 2024 01:36:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TyTGrLjQ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F0202E40E; Tue, 30 Jan 2024 01:35:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578558; cv=none; b=PM9JZBi3vKx78ME0Nb7HbG/sBAN6NFH6qyYyEE6rlFazE5pQh0M2FUkGGVOV5W/hLZPH2zRwLPN9RVNHTM4OczaoXkfram/Dgsunl/esTRIpzMIFqREuOb132uZC2lVt0bbRKYhAtngQSzWo+KvPoDegfFM2ZS/EYQ0lM0IBKHw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578558; c=relaxed/simple; bh=77VtE5VeGNNpbwa0hrebctF5G9UJB4sc86yojoaICLY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UkIUWKaPOnTnJbuZX5mj1lUmBnQnmmwnfZpkIEGbvpAE/FQGzmGN4r9/MzW5I8h65mCLqJF+n2A8NthYqRIC5cVYFIPcbBi0oAz596dMzd3lb3Iuq2cUdlth7pmZL80zAUJ0OELSIhSQmSTZyL1zicLwOwN27UvA8hiVllSoZYs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TyTGrLjQ; arc=none smtp.client-ip=10.30.226.201 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789478042718422189 X-GMAIL-MSGID: 1789478042718422189 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: 193768 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp940078dyb; Mon, 29 Jan 2024 17:37:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9MHrDbu+VgbC4vgScpBqj8K/+9j/12k/QLrX+Sum/oW+A47WvdpRauQWDY8s6AP3JAspa X-Received: by 2002:a05:6a21:3405:b0:19e:2688:f483 with SMTP id yn5-20020a056a21340500b0019e2688f483mr1021316pzb.43.1706578636179; Mon, 29 Jan 2024 17:37:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706578636; cv=pass; d=google.com; s=arc-20160816; b=IsPDMVmEIgItfbIq8TMiH+wyKxIDE34ijnpmHS14R8F+18K7RPOu/ACdjeKm/6Jl5C LQM6KfMlQkCfv6Jh4OvZc0BRMi6Ty45ikXms9XCt03L/eN7Mjo3W+2c6k5/i1eP3+60Y ALA/ZqzitZHdWBIAOlMkzRwzrxNJWKqFxXC94eoWSNo4muBmKyjzEsHQL5hKT3en0ib/ LpYeQH8i0XCiGP9ee+f3J8tSiXs972s1aogKIfFrvs87Q3PkHnzJHkIbadsmnALCHivb we7xZp9KxBLXizxHwgQAz5yqTNfeP1zZ9rP3aHkrMmBBRNo2Sy29KnUUing5Pn0Z9eyb qd1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=WzEYvtVjS/xSTfNpoix0HiMc61saf0CeN3AszWfyWPA=; fh=BzdeVYqZhG5iuwuKJRNLP969rvCput73lx0iwx2zu7A=; b=CEDw2Fvx4aAKYTJ0sbZjVUsbPJhDgIibRJ3fyUWq4nUMwGemGKrBY3FL3MqI16tiAd /CABdRyreFy82IjnGGVQ1fUeEQmIqDGPeCtnp3H/xROGFQtnveE4BA1RyXxNVVpBUYOM li82prJc25BfyZpKzBzzh83LHNJTcj+LX25FJb8tCVVz+FB6rHdxxrgnCnjhcYw4j358 vz5wbEyejhUPDKYNFgVOmaU1FVzo+HdGIqClK5AzXuInCn2x5tKuh1SER56Bw77yg3zm EVG+i2CFq9/8nl4Gl3LoW7egHCAl5UJBdts/eUGlKsKd1aKXz3WBDon5qEs+mj+Mx6pi jCDw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CKZfRcZj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43722-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43722-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id z20-20020a1709028f9400b001d7204a84ddsi6617210plo.499.2024.01.29.17.37.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 17:37:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43722-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CKZfRcZj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43722-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43722-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 3A8E7B22A1A for ; Tue, 30 Jan 2024 01:37:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06186376F2; Tue, 30 Jan 2024 01:36:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CKZfRcZj" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4980D364AA; Tue, 30 Jan 2024 01:35:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578559; cv=none; b=cIQEkS1JsCVTNYdse3AM4ihbBnIHZdv5RCEFJK/FEWSzUo7p6+JL+tLaFiQpDdmVCAUnbxokQLy22gRSBqdg0aB3Zk3SqgM8PERzv/U4v+00oRezKx0bOI/YpIbooZD7u4TaO8ouuAxI2jOzFRITQnX8ZMSOu0xUrkrI5DOuZV0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578559; c=relaxed/simple; bh=GSL7nuFSaQ43gT72aNum7HC23/clv4WedM2oZBR/GrQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=I3WjOyooAf96DVrTsyG/+DUYLb6CAY90vyI0zu8Kmr2pFxai/4Kc9VvkM4x2otOWwEzWAyr9jc6NFNg4USoXOsZS7/VyfYCWNFrZ9VeDPEYB0JRFFiL5Zecwl7EMqexJ5WbwkKgcmqWkEHl2bgvIsmp/0N5EWzpIyOvEZ3CYzh8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CKZfRcZj; arc=none smtp.client-ip=10.30.226.201 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789477399659918187 X-GMAIL-MSGID: 1789477399659918187 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: 193784 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp943201dyb; Mon, 29 Jan 2024 17:46:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9vFYQHwjgWX4+srO6zvRObULvLqndkN9rNzdQ03ICXkaAbgrMWG5y542iYNmkDBceKo7j X-Received: by 2002:a2e:b254:0:b0:2ce:926:f651 with SMTP id n20-20020a2eb254000000b002ce0926f651mr5441914ljm.1.1706579209374; Mon, 29 Jan 2024 17:46:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706579209; cv=pass; d=google.com; s=arc-20160816; b=n0/zHg9Y4qU8aYq58anBt1BDgY62cRTfDfAxUiPXry/by6P2FBPriR/iRO7Ja5Qt6T vBxVY+w89b/MQbA0zu4h4KR3cpwpvOf4lL+EuIyueDQHDutkczGGsHH4Wjg1zonSB3wH 8glg1HD70q73hwaCWpRUxU+CjqP6sX7Jaki0LA7a3pdVeaayGuo6TcxXsK+wadhY83Vp xV8rHG1Kkeu1OIiRIqVtVkdqe5sp/rq4oupQ7NUPFjXT00TD9hSwfJPnUh4uP8yaHLGF 6DInOdlczbpBhp5JBg7+WbtCVOPYnuw1Y8wpdeEwQZdN9w0djJ7aZf9Z8q5oZFwo0LCf o5pw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5mrOv/KaRHlajCAYRKUp9Gv9XtpHmCRS/i1xDUtovrg=; fh=BzdeVYqZhG5iuwuKJRNLP969rvCput73lx0iwx2zu7A=; b=VlH+QHefpi7iiLaRGAb6xpL+SRqIHDBZSu1TgLbmcGlyg6ngKqNhWP/tbUTOkXNQ1/ LrciysUNtI2175qmqZjHty1hoMu1tAEdNcW+qGja0eN1F6wDbcwmrUoqnkpse6ujEoD6 lGVXbcnsoliFzEsDhZDYkxt7dZQIxvYrPWICBtYl0VJ7zv1BzqSDEudH/sBf4yLdbiSU ChUEDB03okqztaSsm5gWt8hPNwOjxqAp1L4xEmgTusCji0Bh9Z5EsUN+pjktdtGJ4/3u sQYI9aJPB9wxoSDq2hBu9jHE6OkS6lsPiIe9ldS28zLZLWP/0DNTkYO+NfVMofVLYVJt RouQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ar1EzV9w; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43723-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43723-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c11-20020a0564021f8b00b0055c9c6ea08fsi4304759edc.237.2024.01.29.17.46.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 17:46:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43723-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ar1EzV9w; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43723-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43723-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B1A671F2532C for ; Tue, 30 Jan 2024 01:37:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06668376F3; Tue, 30 Jan 2024 01:36:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ar1EzV9w" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49835364AB; Tue, 30 Jan 2024 01:35:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578559; cv=none; b=ElfeLCKVnrr+ajWowBzW6n0HbJqk8GpUFjG924o1VsYn8i0gSSHsaLfcSYbA/cNhrJlfIRzbDezAWRy8HGwpOQaLxiuKia3X3tJrZphARWBOkynp4fb70wUfAZR0Exn7i4GWy72sKm/8s2Ecz2QL7kEGf1sZIT+gGyCoCYI2do0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578559; c=relaxed/simple; bh=ZtqTd8FEkkcClpmqlfGDvu7x6/2aDbjjseJMMQvFCaw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VIwTugF/iO9yuYoLuCP1dDmWLFrstz5reyDidizMSzpGvhy7e7WthLxmd4GEgXZJr4bEXFZB4jrVi2aToMPBQCh4sCykxiDD8WVAONWzCKGGfgPrJ8mpljqQ2SgkAg8jzETZ3ZMZcridXumKPdNL3X9PTXmukNHJWV1lZ5j5Qxo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ar1EzV9w; arc=none smtp.client-ip=10.30.226.201 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789478001398196651 X-GMAIL-MSGID: 1789478001398196651 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: 193786 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp943339dyb; Mon, 29 Jan 2024 17:47:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQaQ2gnS51wJvPjtazB/Gqw0x7bRu9xIMQBJx3sg97ONycU2NqrhiM9UQn8gROlh6+43Ow X-Received: by 2002:a2e:92d6:0:b0:2cd:794f:a128 with SMTP id k22-20020a2e92d6000000b002cd794fa128mr5858269ljh.14.1706579232409; Mon, 29 Jan 2024 17:47:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706579232; cv=pass; d=google.com; s=arc-20160816; b=q0HhoANgJr9qJk4iov1vIpx9nR7S4h33GWGDsiatqFd5FtAVc700Bhw1Z5IUogs3YQ LEcxbYFmp6HPl5giFcrEBVuyrR6KLi2Tw90RHO47JDs8MU2kO2TtLjeTLnS9DGCMjkvX GkuMRl+MDKrcwOb3ouznD71CEIQrKYXM+wwaTQOu94xLfe7nxFuSl/qIquf+KLc3OEDy SHACbcjoeyNgo00VmSt1sVkzbAN1KQKlDG6NzUX8IiPLAxP1O3ii0ippQh7UC4la7XWv TgGNqJZ9yRgqDBhNQ1VIGTEM3ukzB0I+0sBCh12ebZuI37LboRU6PNAZBq/KsbpmXors fGgA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=GYqOLNJHvqChvImZaDzafeF6/fUwF8ZZwtM6fSgwe3g=; fh=BzdeVYqZhG5iuwuKJRNLP969rvCput73lx0iwx2zu7A=; b=Iyva6yoyXjZ9mh8Rqlq97we4DRhWWUws4pGfFcCBLDMAHghf3z2WRIQXHryZd717Lw xb9CTdqW52wk3DzLlEXkhg/nuYPiX+IKer3xfKP95XnzKlowBRelOxX4Cr1zN/bYh617 q4DdNYvU0QJJYDHg0U011KaOQIdvf2jQRcnD2Ei1eO2vbLaiq2A+LLiunFVGOZRSO60K 4q98F/V6pHfvSvDXvoHngO4knqcbyxk6brUiZxjl1IDjbeE1sGXBAkBaZzYniYYx0tvK tFU1xDRg/SVQyzJMcaiHmEflBDimrTox4ixglKIdKzf7j9LUPDiES5EbDHM2FirNwQWQ JupQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HAAuZhTk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43724-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43724-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ez23-20020a056402451700b00553dc96be61si4067497edb.285.2024.01.29.17.47.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 17:47:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43724-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HAAuZhTk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43724-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43724-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7DF2B1F255E7 for ; Tue, 30 Jan 2024 01:37:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7947C3770C; Tue, 30 Jan 2024 01:36:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HAAuZhTk" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7166364CA; Tue, 30 Jan 2024 01:35:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578559; cv=none; b=B7/eIvYQDCAjZqFL1vuR32/B1dyD+ym4vM5ki8yKL9kVUPWYHKICk1qnwGtWDBKDGRq+DLxfj1MdBcUhpGo7uypSa+Xob2j0cYYbzEI3hjTC1G4fzr/VxqQB+x+9ubsj1FZAL9n6FPMLmq+D8DdtjdioHUiiMQadSxpHAalLxDM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578559; c=relaxed/simple; bh=OvMM8iJkFhvWNhsVLNub4HhcW21nuv8NW9IL6jHpWeY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=n9rJZ8JPNK0zYLMrz+Z3dV7dhSGT0WSIXt/n3V46eo8v9CX7QAkuDweSbKRwb5ovKFTUwWQ3VxdaDUcuaxf4MJ2+7b8MnCzk2Zkl2tdeL06fhAtB8FZWZ22wjyYL10Y2sJ1R3kxP9I+9331Olr7fQ8WEUbrsKhWzbYfGRBxX5e4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HAAuZhTk; arc=none smtp.client-ip=10.30.226.201 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789478025483134610 X-GMAIL-MSGID: 1789478025483134610 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: 193769 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp940308dyb; Mon, 29 Jan 2024 17:38:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IF5KuJHZtyDu0Rq/SPndpmGvLKSpKtYc31p3z+QAw2F1ynwtLr1aosGoW1uAfpkTrjX0h+b X-Received: by 2002:a05:6870:c1d5:b0:218:5600:e72c with SMTP id i21-20020a056870c1d500b002185600e72cmr8543032oad.37.1706578681547; Mon, 29 Jan 2024 17:38:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706578681; cv=pass; d=google.com; s=arc-20160816; b=TCAcgun7gyyfahERnS9JbfQNW7b9iKOJcWd6Z8gqWUnnJgQfVUPGXl59iETDuiwkEq X/NqQLSSPsZONDaaNzP/ThpWvQ1KcJm9veRzKZXW00D3deVJF9Q1eSFniGai5XPsoWRG YK/kdUlb9HNGMbHz3zmlKC1UuTqyzz5s4kmsZJgWbXbaBIglY4uC2mq+A3oi9wmrSp5M GWyGCvRwHrHrvuLZsPeBbDVr+Q0wWqt+Wk4mDyI6Z8kiABceAwW0w6x6wHK9ZgXw19s8 DlMiccM0V1Gr4pzrQUpXhXCxb5tH1vv7NoVWILSjiC4cpKMOlOnHmuWF6g4HuRCwxppI cyog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=TiqnJbNWgCiHv+i0MWoxbS4Se8F+bil1/y+IujP2iuE=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=ErhfSb0LIcn6IF8Kp7T2Rzthmpei6AARaT608iKY056EcZk+3vXbFa9cXsBxsAknnJ vkJXZ5nlPLZYnVNfYs+jOPKllI8ATrRC8mATkexZUJtu4baM+b+/NDpSiwI1Koa/6Db7 ETIjFZMD6vb6AX9pPLAu9zocZ9BtD/w1Lg6KyfFhX6RYp+4X4wxC7Qzk8RkOMStUzpZM OtRDBXCDSZ6I+aQi55sqbrzR40IslHfdb1ywJxZbhA39QrVWhBW7MNcTr2AZ5+7SmYAk X2zokIc6o5NmDhpDayFsp2fZD8tT0dceRj1dfw12Ge2GodHtBVARbW3Nptmc02Jfr1pd T+Iw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jn2kAJ64; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43725-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43725-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k6-20020a63ba06000000b005d7ab49ae83si6529099pgf.120.2024.01.29.17.38.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 17:38:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43725-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jn2kAJ64; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43725-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43725-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4D9AE28256D for ; Tue, 30 Jan 2024 01:38:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A85D38398; Tue, 30 Jan 2024 01:36:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jn2kAJ64" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 798EF36B1B; Tue, 30 Jan 2024 01:36:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578560; cv=none; b=GNUeGW8ZGYQ468w90q2YdDVk0VHY01KbMwPz52D3ro2b+QoIF13dkPaqVUpnjkfQzrs0Yv4mljnJC5eavU/Z0VV7C0M4oUiNsTMDUBWHa8TbpEC6OuNRB6/KbUZhYTN3PimVpYyWsyILl0KuKIgr/gyXfKRsrl4WO2ESioP8MJo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578560; c=relaxed/simple; bh=QwFDGVTfCJQhExDgwMfhXxVfZDEJjE7tnYoyx4MeyPs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cEy0B004EPCXvZmhUuLZintVuc9x2OFedxGkhHVYDzXsh031nBfxyM9nqGWvljEbbo7uBxX/+NhLLTbYQKqLAe5BzEWdyCcAp8rcjYQJghtEsJc9v+QmVtY0J7yQ3bTftHXB59maxOMi156fVmuEyT+x4yvN8IvFGkYslYDIHGs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jn2kAJ64; arc=none smtp.client-ip=10.30.226.201 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789477447879134548 X-GMAIL-MSGID: 1789477447879134548 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: 193770 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp940316dyb; Mon, 29 Jan 2024 17:38:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFHbs79ceYsTuvPff/KsOnzGJmtbn5wT5yvavtSebZ4d/Hil6OQLrCQEmdnIzrMy8GqI2Yj X-Received: by 2002:a05:620a:2f0:b0:783:4fa8:f5b9 with SMTP id a16-20020a05620a02f000b007834fa8f5b9mr7213043qko.74.1706578682336; Mon, 29 Jan 2024 17:38:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706578682; cv=pass; d=google.com; s=arc-20160816; b=tzSsbUwRl2OSizPJa5RSv1D8UzwiCOt24LOF7IM62ixzr1Ii5+hw02U8MFb5VZnQY0 fxJoW9x6flFhQ+HH8D8Nd+opWRXb+tw9HBwLuzhqeCneyRZaY+A+vEEau0gOsf3/0J4K Py/9jG2/ealWH7DURVFIDHKX8baMyusGjHM07UW4pRZE33oycYFdu2zo1goR4+irkBgy 01p2r5MjZKmNrQ9tDd5mooTHpa3FQUeRg9jzbh9yY2F9i6UdFM/wYjE40hThNinDBfDO zeZexNDsT9dCGEchTSe59mJBZUSejGTPpiLsdQFDVWuFrJhh+w7qKSj2TOMChAaU9oi7 caQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ePn71CF+5khVDS2ZdjmxVHfkUk7BTWUPIbvLbDcmGSk=; fh=9H4z7/o7y4OLn0xLmjdSk9Pth53+ED/R+iGnGlnIr7g=; b=S57/WuvsbHJMzMBv6QZeZW91/j/KBaFxFmZCyiydOc6ZPU5T5nJ2Opx5CDB7GskB8H Z0cuHnGiXmyAjIDvORFj2XMQqFQ4YSG9+bJ/03GRyrjLP8rjSxog97GlUxRT/2KzRVWa BI7lmR2Dj+l/XZ97sQgNSGLEuRtTvO38UhX5AWt9iUemYgGb3hzkgVv8FzQMOVeOm1WA o/WsONnUaXk6yjufgBO21CIDDriH2eN3VGIaE7q59FCZB5UBs95NgUNF41U8oNjmZqtd YrUolR9Vkxkaca1jgBVY16JuJ+gV18lO1dGlp8fXPdNqjZsofnoLztdHfI62gYj2aiDJ H6iA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FFP5NFEw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43726-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43726-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id k13-20020ae9f10d000000b00783b9e48b6fsi8846424qkg.350.2024.01.29.17.38.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 17:38:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43726-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FFP5NFEw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43726-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43726-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2370B1C22433 for ; Tue, 30 Jan 2024 01:38:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A7A038396; Tue, 30 Jan 2024 01:36:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FFP5NFEw" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53D00374DD; Tue, 30 Jan 2024 01:36:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578561; cv=none; b=VIOLkQFFVNlehqU6c9ExXgbENLVHTJW1gP1ZUE3+IYHB3O87Hzh0ItSPFVlP6wRDV9dVj8d0O8aKmcXf4VW3m1RSlLbDnsq/BipKkPG+wDZ/jL2JgSIYarPOeQFUQbEVcRNH5OeUi63+a5IlSP/35Bhz3JiSHp8cU3NSE9xyWkg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578561; c=relaxed/simple; bh=TappCEs1QiYT505+DhU0zSdNYL81quzZAEnLH6jY5LM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JWqdDISbKJu3fNwAKYBR/dr2BQvaRVt0pSeITr7NruYJohg6g6N2v8mtjaHWtHKoJQqnJcYrKRdHzcqrdRaBR8jA5X8BHuzaRR3glykD6Y6YhklX2Ai2T74VoiGXM6Ygcc3NdsujHZW3BWi9vRyuMZfn+bGk7GIjC2fI3iFGsVA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FFP5NFEw; arc=none smtp.client-ip=10.30.226.201 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789477448276643865 X-GMAIL-MSGID: 1789477448276643865 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: 193771 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp940375dyb; Mon, 29 Jan 2024 17:38:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8Y0Sz54zfGpDf8SAAyAgOjuhqf7l6JLLaTe+Yb3iQcW4ompqcoSrLthI9PsueoXkAmhRD X-Received: by 2002:a17:902:e752:b0:1d7:3962:4ce5 with SMTP id p18-20020a170902e75200b001d739624ce5mr8643788plf.67.1706578691261; Mon, 29 Jan 2024 17:38:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706578691; cv=pass; d=google.com; s=arc-20160816; b=jtUWfqQQkcx+G77t6Sr9nyexd1pmh/i6fVHHX63zJ1GBvHNdzm2TPiqlBRsNTloLSW ScVbZLS1ohekr4n2GKpCzM942QbxLW7Q6GJ5IUtObHXWR4/Of8mA4+Qa0HHE/PwQmMlE p3yD3GxddBy2VtLukMRWjSISYg47WqhE7GPSV736545SXDW4tyO6y+NoKjlMBwbZ8X0M 6xf/ZKBeE6Qu/24EAzFB0scpOsZTsaYX8xCuRv5CNyWzXQtgQ3Msc6kjNPPC1Uosh0q1 45ZkAZBm6U3fMjEomf/Dj2UDSu5XfD+6BwqHK4y9W8aN4JVyN3zlTEWelTnYcR2ppVx5 wtlA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=JZ9nRYmUd2LKEQFqpzPE3bK5iXZnlL1JMbCz7lLmhrk=; fh=BzdeVYqZhG5iuwuKJRNLP969rvCput73lx0iwx2zu7A=; b=qY7USUHL4sNw9IjlM9A45J1pHKRfL2RmjK8cdtiMHCg60Fr1nOEA0YksJCZCWvvZXM 2JcIzUslRqFwHh1+c3EzvmxfJW3R29896gwCNTaWMGoDKkWgtnBK7iQxgnnU4oy/Bh6A /vJYfJEP6Y0qWZOplWFOFvsZwhU3gxUKJ1/wrMrDvL4HEskyaV/21mF38PEraRszMnnU jq0AYSrEhn7prmYvpyDUliLRM2NMFqXMbonJAMZrBTmhaKs2a1cZEBI2c48nSUCCnCit 9ghMAgFhcgtOFEYTilof14DgRdJnphEKUrnUfn/gVthlhHekbSPtIhrex2ucKtWPue9V cSsg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U70W3FmG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43727-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43727-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id r4-20020a1709028bc400b001d7105e7ff9si6383772plo.546.2024.01.29.17.38.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 17:38:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43727-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U70W3FmG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43727-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43727-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0E135281046 for ; Tue, 30 Jan 2024 01:38:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8CCAD383B0; Tue, 30 Jan 2024 01:36:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="U70W3FmG" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF051374FF; Tue, 30 Jan 2024 01:36:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578561; cv=none; b=EmYALy3meMOxobZX3Ug4xpaNttlvyZB7iDP7DiKVmcsrJfJ0Xvp7PHDEXIB6gU/w3UOJMl2TQitGqwOjtYI5+dO8M5JACgOj7vQYt2ztgp9IrsTA2uOBPJvXHJQaOX0JvpvjF1W15h1CLlUWtUKA4OQ7CQpALIHp/eTgn7Oqo/Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578561; c=relaxed/simple; bh=6XVXKH5SHkCRbfNXw+ACfRyxafwIyett+q0yka+zTjo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TNP3Vt5X6BdyQ9X7WsuJ60DCT/YFNjayliCy5ITb5mQZfPr0f7pquWnix7Ag6AwOnYrnCT+1yzsV/+l8mQMwwD+aKXY1y2zCqpRoi9EKDQUBLLl/xgE0cjdGD11UPvtZ3Ha8fO2svkq994DSgc5rvSmTHFp99wtXSyQ+kfZ93GE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=U70W3FmG; arc=none smtp.client-ip=10.30.226.201 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789477457705257820 X-GMAIL-MSGID: 1789477457705257820 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: 193788 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp943510dyb; Mon, 29 Jan 2024 17:47:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZJbYHax6GzmpTXKHi3hW8jzLsuVcfxT7DfAHFasBTpqUyDlF7HzjbN4dmPpW50jtmqcbT X-Received: by 2002:a05:651c:2211:b0:2cc:6210:1dce with SMTP id y17-20020a05651c221100b002cc62101dcemr5305562ljq.4.1706579270086; Mon, 29 Jan 2024 17:47:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706579270; cv=pass; d=google.com; s=arc-20160816; b=V7fb+1/CgAgPrdJ5fE1ZdnY3/hSN2F/oqkee3+yjSZVZ0xKYwwtBZC1rXg8JBGFRND et44xHsnY8qVWFq01AeD1RAHQCGb7Rsgsak+8oR9EGuESbNrxklIW61ZSI1IOW9jjx71 fWnqZMVQ48pn1OJ5Rj4QCuaN3UhZuqMB6qe09qU7j0mQCsiKhHzTZYvcaDg41G4PILHB Wjl8SiRnpQ7m6O0GBoRFmLCnMKlUj5pHC6Ox/9I9iSS0QL7IofthgqvgE0awn/lJIdeZ PTvJ4ym2ECvaO3nXgL+EDJYjkPtKqxxMk1xBZ/HIE3hJYoxPiGMuQBYNPuBS/g+hNlBc ze1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=iWu7WAEyRELmGhhGE8LMUQxtmurcGMJa0kUz/u26pBE=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=Fzws42V9+xrEnbwaFmumuafl7CzLiI8MRLI+e7M4EMiwDF827PqECB+SNCgNApLHZP boRiwgL3C2KbZDijIuNvdibWogTSJs8hYufjhRzdUlvMotFN13iN6HgvwLFzM3+jD/3r /8EC35eTJvcqK7MjRcO93dltgmdtydQamXd5feSNzN2km55S5aq08iInwJbSYoswDjgb 41+KV5J32mqSXpVJteS4q4f0WKtwjWTqoDY1koIxAIngML1LNdgX7hcSAxRVjUrMHeIi +EAwc/V5lsIo1JdXdatkwcR1P7fD3jHJqkX4lpGXw4BQvglIKHFZ9jmTwUrk3T5gm4Uy J3dw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DTmLfjtG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43728-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43728-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id k17-20020a056402341100b0055ef3bf39bfsi1688375edc.186.2024.01.29.17.47.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 17:47:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43728-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DTmLfjtG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43728-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43728-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1D5161F2638D for ; Tue, 30 Jan 2024 01:38:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68A9F38DF2; Tue, 30 Jan 2024 01:36:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DTmLfjtG" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95E2037712; Tue, 30 Jan 2024 01:36:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578562; cv=none; b=pouPSMUSf2gNnuwGoWrNVL8gPBiFH519Yeyg70OIarZHcYDbK0TlHnCwnWnd44rJXaU0TYd34agV+N3fFyeRlCA8T/rpRVF/2A0Wa525o+oj2h/UIeQlze+1ZH4ywf3drO+Zm8RwIWFF9yo7i8DG7zU1uxuygFdheI1OhciCFKI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578562; c=relaxed/simple; bh=gcC9dmoQX9j+tKrb8TrQMZADNHfkIGHlBl+HK47V+ww=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OhAYper5gA2flDSwZUupx15y2KUuHwNsZhAwKEt/Z8D8sDpxS5huHKqqrt3JGYR+afVMtvEQ7neJX+rGXhYDmdcAQsiDL2GQL20ssoUuutJQAtUNNCE0DAKv4bBx6/Lrx/MedfHAYttptHECAXIqd6/inWWsHtQsWw4xqP2ARlI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DTmLfjtG; arc=none smtp.client-ip=10.30.226.201 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789478064650969432 X-GMAIL-MSGID: 1789478064650969432 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. From patchwork Tue Jan 30 01:35:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 193772 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp940472dyb; Mon, 29 Jan 2024 17:38:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHBNg7t3XWSwqFohIZj0x6DZobBUZvDBj/mjnWGN7EgqGQT92Eqa7vXQi/J+fr+lBgk301n X-Received: by 2002:a05:6358:52cc:b0:175:e1fc:baf5 with SMTP id z12-20020a05635852cc00b00175e1fcbaf5mr4662536rwz.48.1706578710286; Mon, 29 Jan 2024 17:38:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706578710; cv=pass; d=google.com; s=arc-20160816; b=YieBnlVgksOdr3WQLqRlL3X4k7sgHPkY2oI3fh5wgXUtA62Sg9rcdGXzLT5pOILY/r ExycmmwwPzbr01HTgQO3dwL1ApRGCdKxpMaRLhGZCL7Dfworw28j6S1veOx987DMiLki T7zOanG9lfdJEfnU2sqA2azR+n7kwoC78O/knOOG7sof+VeLseXB5fGGx18gThxEcsnU ENrvs1EeKLdEKx6q1V4Ihc+03BJJiSw5HD+XOFmtmTqMMURrOeJ3EzCpYviA7qhsR+3s AyPe+g7UTZuo6j6+vleQSYsZrILX7TqymJRXmmo5ED3g6JiZg7JwH9YiTjciZmTH2TcT o5SA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=vL0hlig+4JVHHayabKNhLKGvOGtWxJOO63Py1x8aFZM=; fh=hrOAyMKo6dXgT6RT/4rEVznRgaJtWwFWov3iu1DavSU=; b=JhvBP5QBHwaE6RyUDxbqlgYYm02bn39HAGhc+m3zlo4kSMXdAuFUf+/b78XaZaxxSP 1VzcWS6icEVV6/RMccwsqg+AfK/4bzS5kThPRA8HNa4MfeOi6hD+9yShyuBqu7VxAwj0 VM1mf3QkM0COH+ztIt4nFS9nsXIPp56CPsGm4ib3ZAj9fgqhGQ/1o8RyZfDtWUTG6+VM /6jnWb0E7Nnkw9O3tyKo66HlydFHWv63anD9Y+tkSi3vNPCPXLPpf3qj7VsgUeGvMKTK 1oq+EEtYIyqv/j77VPqYp6NCKrJer83MI7uBwio9loy+CYeqMoxRu+LZg1CoSqXfplJY 98nQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AMLXVbn3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43729-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43729-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q28-20020a63751c000000b005cdfed45ee3si6458879pgc.794.2024.01.29.17.38.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 17:38:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43729-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AMLXVbn3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43729-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43729-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0847D28252C for ; Tue, 30 Jan 2024 01:38:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B684C38FA8; Tue, 30 Jan 2024 01:36:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AMLXVbn3" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64CC4381CD; Tue, 30 Jan 2024 01:36:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578563; cv=none; b=AVD+zP9tq4hsX2RZxWG8FEEqT2Ign/Oz2OkWLJppoNif1fKNvaS7WGqtc+m9A9u0vlMGIkfQwUM/gSZp6n7xZlw+971Wd43h+JDp/17wy7XMXQ7bm01fhXA3AFlSeMVY9YrAebRnYaKcBPZ+Hs+2nNU8JUXFLwSa+o5+heptQg8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706578563; c=relaxed/simple; bh=7bWBPmCSHdznVFxRyJOlll8Hcrn56ik2cXlXDedGAEE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=G7+tMMFuxB/QLO9wFMTyuUuxUpROUnFbcZP7HG0xwVbz+ihiAio7q9hsgyrntBquez7RDypwU51qL6inP5c1HaFMqp1ZcWJ10MZtDAsygkQzcZr4ODaHH52kZAL6g29SUl/9r+CEIzYlG91+HO6cuQTY+RHy/gunduyeDK5Mzmg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AMLXVbn3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F719C433C7; Tue, 30 Jan 2024 01:36:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706578562; bh=7bWBPmCSHdznVFxRyJOlll8Hcrn56ik2cXlXDedGAEE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AMLXVbn3ikYp3m99vFuBEfXugsLp/lFqkGEhNptQNvOhTNQW87unjfKJvX8DrujH5 RxrCI6TC5M9lJ4qMyyMwzuq4h6fxlRUnMW1nkvwNbdmezIHH9eRDnKhn4wsTvjl0wR VVeDyZdTcnRWdWZokAXliSsehfMY6kDl+BZxyQElXe8/JjexD4ihBeaIdzxrr+VhP0 hfkwY+4kDPPkMjQ0Q1WSEEYEgCF/pd3AF1mO4WXlBts6/3Cg9jlw2EC9iGCPArcpAa f+v0NUYK0rrGl6SZF7nqnX4RwBSet0dGeI5tMTaXvuFL4gZBsvdLzRn8+5CkaJehky U1FmAQQYOUocA== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Jonathan Corbet , Alex Shi , Yanteng Si , Hu Haowen <2023002089@link.tyut.edu.cn>, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 9/9] Docs/translations/damon/usage: update for monitor_on renaming Date: Mon, 29 Jan 2024 17:35:48 -0800 Message-Id: <20240130013549.89538-10-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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789477477649938495 X-GMAIL-MSGID: 1789477477649938495 Update DAMON debugfs interface sections on the translated usage documents to reflect the fact that 'monitor_on' file has renamed to 'monitor_on_DEPRECATED'. Signed-off-by: SeongJae Park Reviewed-by: Alex Shi --- .../zh_CN/admin-guide/mm/damon/usage.rst | 20 +++++++++---------- .../zh_TW/admin-guide/mm/damon/usage.rst | 20 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Documentation/translations/zh_CN/admin-guide/mm/damon/usage.rst b/Documentation/translations/zh_CN/admin-guide/mm/damon/usage.rst index 17b9949d9b43..da2745464ece 100644 --- a/Documentation/translations/zh_CN/admin-guide/mm/damon/usage.rst +++ b/Documentation/translations/zh_CN/admin-guide/mm/damon/usage.rst @@ -344,7 +344,7 @@ debugfs接口 :ref:`sysfs接口`。 DAMON导出了八个文件, ``attrs``, ``target_ids``, ``init_regions``, -``schemes``, ``monitor_on``, ``kdamond_pid``, ``mk_contexts`` 和 +``schemes``, ``monitor_on_DEPRECATED``, ``kdamond_pid``, ``mk_contexts`` 和 ``rm_contexts`` under its debugfs directory, ``/damon/``. @@ -521,15 +521,15 @@ DAMON导出了八个文件, ``attrs``, ``target_ids``, ``init_regions``, 开关 ---- -除非你明确地启动监测,否则如上所述的文件设置不会产生效果。你可以通过写入和读取 ``monitor_on`` +除非你明确地启动监测,否则如上所述的文件设置不会产生效果。你可以通过写入和读取 ``monitor_on_DEPRECATED`` 文件来启动、停止和检查监测的当前状态。写入 ``on`` 该文件可以启动对有属性的目标的监测。写入 ``off`` 该文件则停止这些目标。如果每个目标进程被终止,DAMON也会停止。下面的示例命令开启、关 闭和检查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 请注意,当监测开启时,你不能写到上述的debugfs文件。如果你在DAMON运行时写到这些文件,将会返 @@ -543,11 +543,11 @@ DAMON通过一个叫做kdamond的内核线程来进行请求监测。你可以 得该线程的 ``pid`` 。当监测被 ``关闭`` 时,读取该文件不会返回任何信息:: # 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 @@ -574,7 +574,7 @@ DAMON通过一个叫做kdamond的内核线程来进行请求监测。你可以 # ls foo # ls: cannot access 'foo': No such file or directory -注意, ``mk_contexts`` 、 ``rm_contexts`` 和 ``monitor_on`` 文件只在根目录下。 +注意, ``mk_contexts`` 、 ``rm_contexts`` 和 ``monitor_on_DEPRECATED`` 文件只在根目录下。 监测结果的监测点 @@ -583,9 +583,9 @@ DAMON通过一个叫做kdamond的内核线程来进行请求监测。你可以 DAMON通过一个tracepoint ``damon:damon_aggregated`` 提供监测结果. 当监测开启时,你可 以记录追踪点事件,并使用追踪点支持工具如perf显示结果。比如说:: - # echo on > monitor_on + # echo on > monitor_on_DEPRECATED # perf record -e damon:damon_aggregated & # sleep 5 # kill 9 $(pidof perf) - # echo off > monitor_on + # echo off > monitor_on_DEPRECATED # perf script diff --git a/Documentation/translations/zh_TW/admin-guide/mm/damon/usage.rst b/Documentation/translations/zh_TW/admin-guide/mm/damon/usage.rst index 6dee719a32ea..7464279f9b7d 100644 --- a/Documentation/translations/zh_TW/admin-guide/mm/damon/usage.rst +++ b/Documentation/translations/zh_TW/admin-guide/mm/damon/usage.rst @@ -344,7 +344,7 @@ debugfs接口 :ref:`sysfs接口`。 DAMON導出了八個文件, ``attrs``, ``target_ids``, ``init_regions``, -``schemes``, ``monitor_on``, ``kdamond_pid``, ``mk_contexts`` 和 +``schemes``, ``monitor_on_DEPRECATED``, ``kdamond_pid``, ``mk_contexts`` 和 ``rm_contexts`` under its debugfs directory, ``/damon/``. @@ -521,15 +521,15 @@ DAMON導出了八個文件, ``attrs``, ``target_ids``, ``init_regions``, 開關 ---- -除非你明確地啓動監測,否則如上所述的文件設置不會產生效果。你可以通過寫入和讀取 ``monitor_on`` +除非你明確地啓動監測,否則如上所述的文件設置不會產生效果。你可以通過寫入和讀取 ``monitor_on_DEPRECATED`` 文件來啓動、停止和檢查監測的當前狀態。寫入 ``on`` 該文件可以啓動對有屬性的目標的監測。寫入 ``off`` 該文件則停止這些目標。如果每個目標進程被終止,DAMON也會停止。下面的示例命令開啓、關 閉和檢查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 請注意,當監測開啓時,你不能寫到上述的debugfs文件。如果你在DAMON運行時寫到這些文件,將會返 @@ -543,11 +543,11 @@ DAMON通過一個叫做kdamond的內核線程來進行請求監測。你可以 得該線程的 ``pid`` 。當監測被 ``關閉`` 時,讀取該文件不會返回任何信息:: # 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 @@ -574,7 +574,7 @@ DAMON通過一個叫做kdamond的內核線程來進行請求監測。你可以 # ls foo # ls: cannot access 'foo': No such file or directory -注意, ``mk_contexts`` 、 ``rm_contexts`` 和 ``monitor_on`` 文件只在根目錄下。 +注意, ``mk_contexts`` 、 ``rm_contexts`` 和 ``monitor_on_DEPRECATED`` 文件只在根目錄下。 監測結果的監測點 @@ -583,10 +583,10 @@ DAMON通過一個叫做kdamond的內核線程來進行請求監測。你可以 DAMON通過一個tracepoint ``damon:damon_aggregated`` 提供監測結果. 當監測開啓時,你可 以記錄追蹤點事件,並使用追蹤點支持工具如perf顯示結果。比如說:: - # echo on > monitor_on + # echo on > monitor_on_DEPRECATED # perf record -e damon:damon_aggregated & # sleep 5 # kill 9 $(pidof perf) - # echo off > monitor_on + # echo off > monitor_on_DEPRECATED # perf script