From patchwork Wed Dec 13 19:03:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13491783 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 CDFFFC4167B for ; Wed, 13 Dec 2023 19:03:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5FB808D0050; Wed, 13 Dec 2023 14:03:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5ABAF8D0049; Wed, 13 Dec 2023 14:03:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 473228D0050; Wed, 13 Dec 2023 14:03:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 3649C8D0049 for ; Wed, 13 Dec 2023 14:03:52 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 1063B160BAE for ; Wed, 13 Dec 2023 19:03:52 +0000 (UTC) X-FDA: 81562719504.13.EDB0C0E Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf11.hostedemail.com (Postfix) with ESMTP id 122914002F for ; Wed, 13 Dec 2023 19:03:48 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=FsMpltOj; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf11.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=1702494229; 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=uVHyYSGpOQsScDTHUEVed1QVfAfQSkGLuhr9Kf2CW/U=; b=EkX/vLFOylEzfCc7txbzSXD31eNiY3lnLOKkK8k6m6bQBrDrlCpGlKpI23IHYZvlKttNDT gflBYyLBHNZhkJ7gX7ZZBy6eq9S9o/D8HNJjwRgUTI3u/1XzEkB+atNrV3aiVxmb2c5x3C JZP8cvOnQyHi9ppJHGNnmMnFHs2b78c= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=FsMpltOj; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf11.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=1702494229; a=rsa-sha256; cv=none; b=LrXzawUQgAVZxDA4bvu0s2UuzDulOGK4WPNqx9pjkTz6+y1l6swClnEveMhHA7637S/bqd msDlK+8qe6xjGKwC/X4g4jjC/NswjISCaA2sQ9jCwmyBfHCbEgQz9s1qqaB/O+vOOtxuNn P1EMR3Bn1Ww9OSQc6ocGWYAIo+2gQlw= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 0688A61F49; Wed, 13 Dec 2023 19:03:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AFD9C433C7; Wed, 13 Dec 2023 19:03:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702494227; bh=zkxV/sJ91hBwZ2pcDcldOS6t/0SJ1DBEmN593qqkP8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FsMpltOj8b5LLTVNjVwEqLIsRh8q05n4NT8JLQWlwVypSIKY6eN74NUwjf7yqfpGu K5QgM7ZGlZgpO0+2xyPPwj7bykR38c57sfAW+T9Ao8j5z3hwb5zsGYaX2bp4ERAOIq Z5wLSbvbkf1poMf7iFSWJqG/+SAJvZeyYvzfeH2S3K7/YAgYvasfi6Pe7ExgKIKrZE WDpJQTooHK/zayfuGnOGXGPjkCbLj8B817wwNwwlfOY6fC/vNqRivwT1mVnuksHKVT r3q+ype7ln+bWVGHZ2b1VkLaO6j54rq63bhQPDjWe1sKfbbmdfzHqCHP/3eXz3IIpK Ff4KF5MNj0fOQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/6] mm/damon: update email of SeongJae Date: Wed, 13 Dec 2023 19:03:33 +0000 Message-Id: <20231213190338.54146-2-sj@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231213190338.54146-1-sj@kernel.org> References: <20231213190338.54146-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 122914002F X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: b7zobteh5ongheoygg9cz84grdjgujc8 X-HE-Tag: 1702494228-170688 X-HE-Meta: U2FsdGVkX18nIu2ilVwB3h3NzYLds49WNyzx+ztr8FZELVMROTG5B0Xd+kJYHGUweF2tt2wV1qNXB1P4+X9/Kj9cjMKTAJzQBhD8qshv+mn7AmFsHM7EjoklipcQMT+gdtzvy5glw8ZG9ih9iI/+Fc+IFEq9U3QSD+Y/FzwHBnGE7FbpNp1dhjjD3/f2E3cHlLGM/jc5h+3d6OdCSxbUCM/nZ2cjGv4IoKdwL+9pBy5DsNPxrnj4u6pdDrvMdafvgvhPV09ZfXxcZyd/uaf1VbjPtnNfWCyjw4FmdH08aEgwoDK5jfnE++kxRnlvcPJj/gjUhLqWX/6QYrSPG8KmuKZ+rqhSUyFk+WNgpx7ZrDpF9o5sMP+xXbpigdj9f8eRQJfFqAczH6Z453MbABbUcRfr25y2fKoj0vgrRaxOTWbn+Y0fdNnD3SLmQMNI4BI+6UgswGsh4VLX3E6ZSqynimQtWc4m5Ik4pKrAPIp2RacTijUHefYYtPS/U661tzqkYcWpZlwrt/2uHeB1sX20kW3ixWi9Vo7W5kkoMIhN/RJeaf/Uci85r84nkl+9MzzXo87cMC0XVVV34iC2tcMbH3aArprjXO+G7Bygv9Ty0HtLApcVsL3gSgzfx7fm0be372T4q9o5kofRiMQK0aRuHIVnnBuQ5RqLeeHGFzyil0RRHeDlZC2Ha7kBa/dTNy8vVXx/VNQPWWR9nB9V3w6OKdZn5gVVRMMgavYS48qErPm3MS/SxPcPCFipANNTkVFPJsqIKeq1A62igfGaJWJ0kI3gdzZjfh1iiufyGB60CODOxMyWo+8QAU+DdLvDF6sQS/BLX/VoIP56lfaYz9vo59aVyZiPMYZEK3+RUqmhmWdkAvuvIJaVA3hc+okmbUoxzuYpIVbutN9YDKJykOkVD6B0RdHE+PvSnAM5xNyMuAbNB79XPF3Iwv9x6kci/XkN1HqtSzWbiHaCswWU2tB vaBTKTs3 God3n7AzWdIuAaCxgJHeGqTGEJ2fG3jENZkthdITtnlAS6zf3FzOode6uIEUdOY9jkocysW1LixqVaERmvvFxLp1uT1nFdaUft9E9UwuBXY8wCMG6OBLdr6RqypCPKcXiYgS/O+TtdJ2pQQGAWJHqZ3HpvHndYES6Zk1QrV2ISQ3LZs6PguOrhDXcYOEpRoiSFpvqwPBjOHEOTQtEchEN+JJDgLb2KCEdebMLizIU5gBFYgPjsnv5wlSvygerp3cGSCGTrHRXqcqco/pdD/ioIZE0DHkLiPv4WHYJ 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: SeongJae is using his kernel.org account for DAMON development. Update the old email addresses on the comments of DAMON source files. Signed-off-by: SeongJae Park --- include/linux/damon.h | 2 +- mm/damon/core-test.h | 2 +- mm/damon/core.c | 2 +- mm/damon/dbgfs-test.h | 2 +- mm/damon/dbgfs.c | 2 +- mm/damon/modules-common.c | 2 +- mm/damon/vaddr-test.h | 2 +- mm/damon/vaddr.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/linux/damon.h b/include/linux/damon.h index 12510d8c51c6..5881e4ac30be 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -2,7 +2,7 @@ /* * DAMON api * - * Author: SeongJae Park + * Author: SeongJae Park */ #ifndef _DAMON_H_ diff --git a/mm/damon/core-test.h b/mm/damon/core-test.h index 6e5e9502d648..876e398557b0 100644 --- a/mm/damon/core-test.h +++ b/mm/damon/core-test.h @@ -4,7 +4,7 @@ * * Copyright 2019 Amazon.com, Inc. or its affiliates. All rights reserved. * - * Author: SeongJae Park + * Author: SeongJae Park */ #ifdef CONFIG_DAMON_KUNIT_TEST diff --git a/mm/damon/core.c b/mm/damon/core.c index 2c0cc65d041e..36f6f1d21ff0 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -2,7 +2,7 @@ /* * Data Access Monitor * - * Author: SeongJae Park + * Author: SeongJae Park */ #define pr_fmt(fmt) "damon: " fmt diff --git a/mm/damon/dbgfs-test.h b/mm/damon/dbgfs-test.h index 0bb0d532b159..2d85217f5ba4 100644 --- a/mm/damon/dbgfs-test.h +++ b/mm/damon/dbgfs-test.h @@ -2,7 +2,7 @@ /* * DAMON Debugfs Interface Unit Tests * - * Author: SeongJae Park + * Author: SeongJae Park */ #ifdef CONFIG_DAMON_DBGFS_KUNIT_TEST diff --git a/mm/damon/dbgfs.c b/mm/damon/dbgfs.c index dc0ea1fc30ca..7dac24e69e3b 100644 --- a/mm/damon/dbgfs.c +++ b/mm/damon/dbgfs.c @@ -2,7 +2,7 @@ /* * DAMON Debugfs Interface * - * Author: SeongJae Park + * Author: SeongJae Park */ #define pr_fmt(fmt) "damon-dbgfs: " fmt diff --git a/mm/damon/modules-common.c b/mm/damon/modules-common.c index b2381a8466ec..7cf96574cde7 100644 --- a/mm/damon/modules-common.c +++ b/mm/damon/modules-common.c @@ -2,7 +2,7 @@ /* * Common Primitives for DAMON Modules * - * Author: SeongJae Park + * Author: SeongJae Park */ #include diff --git a/mm/damon/vaddr-test.h b/mm/damon/vaddr-test.h index dcf1ca6b31cc..83626483f82b 100644 --- a/mm/damon/vaddr-test.h +++ b/mm/damon/vaddr-test.h @@ -4,7 +4,7 @@ * * Copyright 2019 Amazon.com, Inc. or its affiliates. All rights reserved. * - * Author: SeongJae Park + * Author: SeongJae Park */ #ifdef CONFIG_DAMON_VADDR_KUNIT_TEST diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c index a4d1f63c5b23..a67454b825dc 100644 --- a/mm/damon/vaddr.c +++ b/mm/damon/vaddr.c @@ -2,7 +2,7 @@ /* * DAMON Primitives for Virtual Address Spaces * - * Author: SeongJae Park + * Author: SeongJae Park */ #define pr_fmt(fmt) "damon-va: " fmt From patchwork Wed Dec 13 19:03:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13491785 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 5A3E3C4332F for ; Wed, 13 Dec 2023 19:03:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 69AF78D0052; Wed, 13 Dec 2023 14:03:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 622138D0049; Wed, 13 Dec 2023 14:03:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3D9028D0053; Wed, 13 Dec 2023 14:03:56 -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 03D368D0049 for ; Wed, 13 Dec 2023 14:03:56 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id CB44C160B7D for ; Wed, 13 Dec 2023 19:03:55 +0000 (UTC) X-FDA: 81562719630.07.4C1E940 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf02.hostedemail.com (Postfix) with ESMTP id 757D38002A for ; Wed, 13 Dec 2023 19:03:52 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=gh6j4zF8; spf=pass (imf02.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 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=1702494232; 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=DxjDroIjLb/yV0SRilP6CnvUfpB6EMvy8qlj20QciKs=; b=BFg/yPMwDpZehvfp7cnIa8/q8tGFd6bBOWtCVYFeg/eVs/QuAp+snUP7NtZFp3SxEz49N+ DESLyNPY67u+tFPHbNjQFqyJZz9zWjArKS+ocolhUzcDPfY6oSDYfIFevtiAdlcWJRYGIF RJu8C4bH7MKzGRLLXK/FnNMEFSOUbxM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702494232; a=rsa-sha256; cv=none; b=vqI59ptqp4eZjRlf5IXa7K/mSZKTFgey0IJnoNITEBPJ8rEx5usqBDmmDJyiUh+ZEB1rye R3nVaocA8ujSIndZmNjOLUdOsQQQuZD6thLrxH8IkYUgP1pJFCFLEJ1q+7dOOAa/U97E0o 6sI2wHrWLW3hQbd2j8zyYkxEQBnhRNM= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=gh6j4zF8; spf=pass (imf02.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 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 ams.source.kernel.org (Postfix) with ESMTP id 53172B81F1C; Wed, 13 Dec 2023 19:03:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC743C433C8; Wed, 13 Dec 2023 19:03:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702494229; bh=gjBQjP/YI+pvMOKNh4ddMdbLJ3KLmfM9HXn1Dp4kPVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gh6j4zF8l93bobVI7GSErZD+7LyrzAOafaTw/R+gygXqiWV4CRdqWwXQ4WHnfcO5A ntCVTNa3MG2BjUATa9SvAKwQAfINk5MJbH1cQsimTz2xBRm2XyU16JA/pkCDCVZBLM tYqx26QhH06nd6+RI/CnV0NU7hK5ynOAW+Z0EaxqXgVK7aTJLDK+cN15J+KLBe+wGl FPY1GTm8dlM/DZ8CdH2eMVZ9cww7cSXDsMBAbUrukA7Khyyau/bnOZiSGqHIhpwnXk UQuZluFbU+/gS0nN3hGdfFYeZSaojRVgc0zs0RTAEI3p5ZqKWxiCp7cU9I6UkJIWWW PXaXBm0veoOYA== 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/6] mm/damon/core-test: test max_nr_accesses overflow caused divide-by-zero Date: Wed, 13 Dec 2023 19:03:34 +0000 Message-Id: <20231213190338.54146-3-sj@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231213190338.54146-1-sj@kernel.org> References: <20231213190338.54146-1-sj@kernel.org> MIME-Version: 1.0 X-Stat-Signature: wybjjzwugfkbd74mtsu6f641hukp5jnq X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 757D38002A X-Rspam-User: X-HE-Tag: 1702494232-575547 X-HE-Meta: U2FsdGVkX1/Po2R+CdExgxIwri2wCTWeUfCGiUZ2R3F/JECkrI+S4rwy/GFCUWZYOL0CtTSq1qM3xkSrya2iMBLQKi4B0KyCFr3dfUQFjiwdmwpHiOa0PyYdSDXbukDQ5l7uufUABgmOkQwUVS0yJIoLylzBUrNcMPLSht32tqIvmowUhH1UU/c5q269Wkz9YPLetkQbClAuj0qV837RSuTg0gfeq0NjnVk9uphQjTFE6ZAMt5g5PtJ1XlUVTa+Me5Ng9zGwJahGcTUqiSnfKQMcgSQJIMjSFMzbzEYDvOJPVKvixdXGbJpjOxatYYpQvCZQEP+LZMlwW2QeshLrxU77i9FYz1Wn5dJB/gsowyMeXCti3pQFHqH8o2pin+dWFtCjigutLD9HHz91o1FLfSQxBxyxNKwp6JotqLVlfl2nGi+64rD7lLKNFybRMc+p0J5V9YZo6BlrY04utHaesmSA/EiQdl1p777GY8biD5H5k7oj+K2EYs87T5y2Pyq5FLXtP8Q0GAw2Wc4LMROzuAXXVFbx9pSvHHBj2VrKMi+H0P4YnsbTJO4soCsLj4Vsx9zCXjqyamn1+hbtrNHLDDifcOQvZnElk0pANPPVQZ5FuU/l2yTn/7kn/EkO+rDQwN9FgMiSV3YbCop0gKoNMZyPumPVO0uDikWKvZy7jzjRyWz+PdEvltI5jaxwUlhdYn7baBftD0Vbj7BsZZvYHyzX0ya6nrWsymD0AiA7U8t3Z3H2SkNSg22By9MhckpcyD2rTPvjcPblb6oHacjGyfxHRAzYBGouJiCWK+8I4Cweje94TubHIZz3OpamBnn1QpR4cW43CogjJFb+hdfIwxfwKJOdTTH2LFWE0QHg8T6tnAfWZ6+AATThot1Y28X3xcgpaQ58mVFBvlrqP6brNfX5V14zUAnMotS5/yrnOGkJQCoiEe95Zxguu84b1KVSLjFIVHLdlGL8w+7BiFP 4e7ZErvD BYdL8lHhVIDwV51ZMeEcBjaLrTdFblriQkyJWQYmA2+jUF+TK7rJpJv3HH5pYxW5HcIX1SEFDT6eS+a8+kZKc9rrDhgdDqLlxERTSQuoAKM5i+EdgwTL+scNPeqvk7nNiyUPVisMHYMCXi8AgL0RyuNMd0GWERQNkjUeMTjtdbZgfvMX3V3AKhMWlD3IX0vHi9Iw9AC2n86Bm6FFw5NK5U/e1+hxai6V43czyY9ntARoQwgrXRzCHI3CAo3OeZJDk/c/I82qgRbr9QcFkpdYw8lvIXg== 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: Commit 35f5d94187a6 ("mm/damon: implement a function for max nr_accesses safe calculation") has fixed an overflow bug that could cause divide-by-zero. Add a kunit test for the bug to ensure similar bugs are not introduced again. Signed-off-by: SeongJae Park --- mm/damon/core-test.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mm/damon/core-test.h b/mm/damon/core-test.h index 876e398557b0..0cee634f3544 100644 --- a/mm/damon/core-test.h +++ b/mm/damon/core-test.h @@ -302,6 +302,16 @@ static void damon_test_set_regions(struct kunit *test) damon_destroy_target(t); } +static void damon_test_nr_accesses_to_accesses_bp(struct kunit *test) +{ + struct damon_attrs attrs = { + .sample_interval = 10, + .aggr_interval = ((unsigned long)UINT_MAX + 1) * 10 + }; + + KUNIT_EXPECT_EQ(test, damon_nr_accesses_to_accesses_bp(123, &attrs), 0); +} + static void damon_test_update_monitoring_result(struct kunit *test) { struct damon_attrs old_attrs = { @@ -487,6 +497,7 @@ static struct kunit_case damon_test_cases[] = { KUNIT_CASE(damon_test_split_regions_of), KUNIT_CASE(damon_test_ops_registration), KUNIT_CASE(damon_test_set_regions), + KUNIT_CASE(damon_test_nr_accesses_to_accesses_bp), KUNIT_CASE(damon_test_update_monitoring_result), KUNIT_CASE(damon_test_set_attrs), KUNIT_CASE(damon_test_moving_sum), From patchwork Wed Dec 13 19:03:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13491784 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 9D9A0C4167D for ; Wed, 13 Dec 2023 19:03:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2071F8D0051; Wed, 13 Dec 2023 14:03:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1997E8D0052; Wed, 13 Dec 2023 14:03:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 013028D0051; Wed, 13 Dec 2023 14:03:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id DEB978D0049 for ; Wed, 13 Dec 2023 14:03:55 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id C01BBA196B for ; Wed, 13 Dec 2023 19:03:55 +0000 (UTC) X-FDA: 81562719630.03.96052FD Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf26.hostedemail.com (Postfix) with ESMTP id 731A3140013 for ; Wed, 13 Dec 2023 19:03:52 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Hyr+2MY6; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf26.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702494232; a=rsa-sha256; cv=none; b=3xEN9MpDaC8Q2ReOdh7oJwzf2ce8bBwiF65S27+nMuTaldd4FrSwkF3w3kUyZMdDkANwff qNwVdkWtPo/BlQta19KK3EJKvICM2COpzao3FayGxTy6CUUrKdhymB2iUMhzuuWCT41sVj yG0tLfFAeIxNWHB2+foFJHXAq1KGiSI= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Hyr+2MY6; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf26.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 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=1702494232; 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=/JpHE1Fbo0I1s3wjHDCA/SuT9Y2KeovIqrYikHaS9VQ=; b=yvl/Yscqr+y+G0H7HbIyYI8v80fWr4Hu+hr/pDUfvt/EBAShvhkHCPBOPEUQhvyvM11THT zZtrSaBTnH6hA943xClsFdlFMtWDnrSGc71OPZNJXBncgreya/hzXIOtmDkyUDVMs6FFvt LdnEktF1kMBJ7dOiQKnpSAlfCGscV5k= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 05902B81F21; Wed, 13 Dec 2023 19:03:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BFAEC433C9; Wed, 13 Dec 2023 19:03:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702494230; bh=DCzjM8ciFmSW1ZwCtCZzL7l/QtzSRPhWneY+wKj+vU0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hyr+2MY6xPiuvWwHsyk6RV0Torov76tR6btlHqK49UggV0nEVIZ7ovqJ6MqiyQoBT GJ6ggkCUIcocYQhX+C89P+Vh9n1X1PnrDZs1fw0/7mW6bDPCgI8S6xipNOcslhVGmf OFrxcOB7yW+r6aoNVwiKd6TxmCRcFJdJN6sC2uhEVPUbFUSqM/8TKyhIA/VF2kSaJM byTvwbOaaFViPxmxVRJISegjpfBKtMo0iUh7T10NR3wVO+1YRpxRMcSv3FINCQEFxC w2Y77OA4sFv5hwpDOHF64Drm8gPpHk4VToAgobXt0zKgYIKbhnxYA9yC2GCMeSeSXg sbt3PYCKBjPoA== 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 3/6] Docs/mm/damon/design: place execution model and data structures at the beginning Date: Wed, 13 Dec 2023 19:03:35 +0000 Message-Id: <20231213190338.54146-4-sj@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231213190338.54146-1-sj@kernel.org> References: <20231213190338.54146-1-sj@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 731A3140013 X-Stat-Signature: zd1iy1166erqi43jifpf919pjrpso1ow X-HE-Tag: 1702494232-251481 X-HE-Meta: U2FsdGVkX19CTHt9c4TgUx2VL7q59tYbwsYEokMOkx4mxVtro2X3xD+Pucg/S80/5Ww7cc5mULF97OUP/5/0hajQGiGOGrnduLw4vskgomhX5khNo3r/d5muBf2+rDqRc+8QKQkZlHlPllL1oR8I+/34uTAPutbO39x3i//DgkXoOMOoGuER/AlRi0srUWRt6ZxE4KBwlje0AotfAJsZAEZC4xE+odaLnVFwpwatr5VYBtsw9QKQh19JA3D4/az6tDMsiar/ah4Gow4gDia72Xmz2V0ipT4/PW9Ky3wtYnSyk77lQEiUqObxJug1feI1pvFHko5IBbyNmvrAEqQT2aEexd7i/LkbWg279zVhmX+PAFS4LlVi12k6ja069ndnCMr5nY1klKBLPiZKzJYnBVp+yiIQJlH57p4MfE3JqI+OFRIq+5Q4Ptw0VsksOicZqaF7hFSntbEuRWTl5Lcn4FCbRySc22cODiMhSt/q70BLa0zorgXW2ERWkqT1+ylXUAfxs10h2NzuEk3fsyVhMC3nHtKJafO6DcL+bce2tg/N6cgbkAWIxVO/Ncv5u5R9x48OsdUNzOeyMrJ8lbxNwTTL1Pg4AWCkFmy9Rjdq1zA+LWUaBrNyOzx2QeFal9THY7MIxUMvpD9d6fD2cSQzPnMSXN9/g/hSzVrbpo7ci1MnclaYEONgwj+AafjJWttKal1q6IAt4eYSLsO1ZOXdC0jApt/Q1TdN4bkj4gS2e3NajcB8d8PQXGNI06kKT/PwUOiNc4gbYaurbXgYSMYWa9dcMhmtKs+IWe9XEjA8Pu4rKzNf63qbnnS2jCgIWq4M4TJ+P658Q2yfRulvo7Pk2JH/FuZIBhzHtI1xa1GemL66LD/OuY4PqhVASYHTyqxXUGNXOBJNF4SRNLC3l+yFJk22veFmsvSyc+BuK7RIgexOt66L0vZR4giOQEkKXKoJDT9LUvDjBHzlzI4VE1s 18AnjFnv 4m6nKA0cV6BhjhHO4aybLaoU7Uv4mAZp+h5Re9svx314oOlS1ncsbrzjDpUy1ejiLlh/jlg3mf0i8HOsqfZmbQXP7ZGY2KVls65+L0EkTsgQtjpf3tzqOGuKapxcSTI+b9rdbCpc0INzmBTMn083CXE/5oy4dKPvGJKGro5XdmM2ugES5DEzRlU6MK7weSZ2gyLzXppxFRyf2i+lUbhDiDbA4eQYz629bzVbDuZugc/5FruM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The execution model and data structures section at the end of the design document is briefly explaining how DAMON works overall. Knowing that first may help better drawing the overall picture. It may also help better understanding following detailed sections. Move it to the beginning of the document. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 8b4a49ac057d..1bb69524a62e 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -5,6 +5,18 @@ Design ====== +.. _damon_design_execution_model_and_data_structures: + +Execution Model and Data Structures +=================================== + +The monitoring-related information including the monitoring request +specification and DAMON-based operation schemes are stored in a data structure +called DAMON ``context``. DAMON executes each context with a kernel thread +called ``kdamond``. Multiple kdamonds could run in parallel, for different +types of monitoring. + + Overall Architecture ==================== @@ -490,15 +502,3 @@ modules for proactive reclamation and LRU lists manipulation are provided. For more detail, please read the usage documents for those (:doc:`/admin-guide/mm/damon/reclaim` and :doc:`/admin-guide/mm/damon/lru_sort`). - - -.. _damon_design_execution_model_and_data_structures: - -Execution Model and Data Structures -=================================== - -The monitoring-related information including the monitoring request -specification and DAMON-based operation schemes are stored in a data structure -called DAMON ``context``. DAMON executes each context with a kernel thread -called ``kdamond``. Multiple kdamonds could run in parallel, for different -types of monitoring. From patchwork Wed Dec 13 19:03:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13491786 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 06B97C4167B for ; Wed, 13 Dec 2023 19:04:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 031E38D0053; Wed, 13 Dec 2023 14:03:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F24538D0049; Wed, 13 Dec 2023 14:03:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D9C828D0053; Wed, 13 Dec 2023 14:03:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id C4B3D8D0049 for ; Wed, 13 Dec 2023 14:03:57 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 9CEADC02DD for ; Wed, 13 Dec 2023 19:03:57 +0000 (UTC) X-FDA: 81562719714.01.650DDE2 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf07.hostedemail.com (Postfix) with ESMTP id 6878C40017 for ; Wed, 13 Dec 2023 19:03:55 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=e6h4+M4V; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702494235; 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=tg2uyb7t+PZjG0lQa6RK4Xkz+2cMWFz3xMAwaynfzIY=; b=3xoR6AWrpKOB08TPoxsz6ZAN+N5QG52ns/fg51njrcaXc11CbjQUehhvu1L00SzBNM+qS3 xUVYrIMf5Pp62KKpdUCJLhFvNNZRNkKbzXfzhJJPy9RieVNe7uN9AE76L8bRSVZU0jg5B+ WUSyLyh0W4eqREAEFemlyKmDBFbWppM= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=e6h4+M4V; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702494235; a=rsa-sha256; cv=none; b=mDbouIvkmU6S9WydVgGPs3kldZX19V8B5RTIYuutNXLVWBYiLjVpA0BEaeD29VA0+LZvi1 wIAWCxV+HMzI1RLvIWXVv6o/Dg1Gp6Pc4+oAI8Eeedu3nVcknxPA28UknaHHdK/rfT32tX AZuTJW+ST3Q04rCXnjPGyTidd/JQxas= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id D2AF4CE20F6; Wed, 13 Dec 2023 19:03:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87CDFC433C8; Wed, 13 Dec 2023 19:03:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702494232; bh=pWtLPm1/J2Yj2cliVy3Ne0rBNlxUd7IWRzTe9t9tVB4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e6h4+M4VC9qAjLnh23mRoTfYMBmcRe7YK9YydYIyZ09VAvI0u25sqAx5wFzEOvglJ bms5Ts/CteG4vueQMg0M8R1KIdBc+qylann1icA1m6XQNV6UlClJgSixwym3Q+/OPS 7hrXEww0BdjszDcObO12DcG5bh8L4kZd9r28ZQfQTwR1RIQSZRhdG1VKUCz0W/Ys2g nz+1I5d/UazRfTgZj0FBz50eg7TgQHkNSyjdp2e0MMuKAeTtxSJF2VfLkeNlzkwk3Y xGJSvQHRdo8ZPUBWZUjiNk4KmGiBYRjv4fZLRTXiDdfShsfeDmQgOn0LCEktym8yFU ZBkifW1LIrDiw== 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 4/6] Docs/admin-guide/mm/damon/usage: update context directory section label Date: Wed, 13 Dec 2023 19:03:36 +0000 Message-Id: <20231213190338.54146-5-sj@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231213190338.54146-1-sj@kernel.org> References: <20231213190338.54146-1-sj@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: nm44jg5pgdkh6yafzfugmj5gdix9orpw X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 6878C40017 X-HE-Tag: 1702494235-129139 X-HE-Meta: U2FsdGVkX19k0sPgKX1xNNJDhFuAsmhuG54GCJNe7u0pufHtxld5nvJfP9E+L/TykImEVP3NF4u07ZizB01bU25Qe3jrND3ZHMo629vPsyKth8LgfI4yVpX2Ocz8ZGX22eAPhHNFEmzrk3RIbp5L6eu504F/WISbVZQlENtFckSUigmQ3xMZYwsNwXFyqimRQnaP6zU891Xwwd95Lnoab8ybOy1eQl9+KDqPawdklkwDbQEGTPhS8x1CLxx9ZeIsVG9kdOdd+Dw80eWFKQJV0g+8elamY353iAoLdmGTykAZoZbNEp2YYtPA/X8LxNKMW6fVhkEZP+xhO0oQdEQRaEdCcakujwdpmwN2Zp+/HcfdJuSFUlkftp7vRfZ5LBbDDwtuLAfzSZCv8OhPuCo6jS2CPxgqpFFbOKcaQ3VJn7R6AHKl9z7jWoMojgt1IN6NjK9Ii53bYOKxngKIvpNcItq+5h8dOPl2zWmmlvIdlyHuh4CSypyfL7wdOosnaMKADQ2MkPw1ALCZ2S+zHWcAXv9dv2eJg7hrPYVGCUtoFMSMfVartgpddPfp5iDblLHsnaGuWE0t8E9pnVCORGHY/eOfx3evQWuMttCGqNREOE/cWiO02xPgTs6WBrkwIcWTwBWHF7cUrFoJj0XZtrbO+vbArGs3bLLkWLDyTHaoHp0GAOKGd2mqsi32lIrkkTuC5Gblbqh4/ZWnoC5qF8uA+T+QRYLj+0w+/VdxvY2UwFpzS+C2FC4BDG2iOOJb46ziAlMnUIWy3vyGTf0umSsalrTg21SBHrk485fPBAReLbhaYSDPdV9biyWnYq79TAmqQP1cnew0ukOvI03mGvrF19gxTUZtSWjXAlaxl1yyBLc+t4KdAqUkDGF7cOzivj/w2cZnlAc7WEHqp5/YIEsNq73kfBeczyGHEbszWajeGogY9iWQjk7yJJqH7zh42fb7lZO3B45LOCwjOblu0CB aco/OAeS 2w5EQ8MCqbbfbFhUtuZiRO/oOEEz+q7QOa/c41vPsjjhvBYIKZNscn1NM7a3OjGIV+4K25TbEl44RxSj1LtlWdlwlqiKinod34Agc7vb+uXskGbtyqQ9igtXkr0672Qs+jUz/GQKlg9X0A9ykg5t89u5BpZY0bXG9TOP+6bECymB4K5+iI5VNZgtmYsHlKgQHWAQ7Pf/898aaFG6E71ATRtfar4KDk/m2+jiuqYibi3WyPGsky49TECR6tzeKD+S/mfuRqiMZ4LKSaII= 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: The label for context DAMON sysfs directory section is having name sysfs_contexts. The name would be better to be used for the contexts directory. Rename it to represent a single context. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index ff9f62e65722..d3514367703b 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -164,7 +164,7 @@ number (``N``) to the file creates the number of child directories named as details). At the moment, only one context per kdamond is supported, so only ``0`` or ``1`` can be written to the file. -.. _sysfs_contexts: +.. _sysfs_context: contexts// ------------- @@ -288,7 +288,7 @@ The ``action`` file is for setting and getting the scheme's :ref:`action from the file and their meaning are as below. Note that support of each action depends on the running DAMON operations set -:ref:`implementation `. +:ref:`implementation `. - ``willneed``: Call ``madvise()`` for the region with ``MADV_WILLNEED``. Supported by ``vaddr`` and ``fvaddr`` operations set. @@ -428,7 +428,7 @@ pages of all memory cgroups except ``/having_care_already``.:: echo N > 1/matching Note that ``anon`` and ``memcg`` filters are currently supported only when -``paddr`` :ref:`implementation ` is being used. +``paddr`` :ref:`implementation ` is being used. Also, memory regions that are filtered out by ``addr`` or ``target`` filters are not counted as the scheme has tried to those, while regions that filtered From patchwork Wed Dec 13 19:03:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13491787 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 7A427C4167B for ; Wed, 13 Dec 2023 19:04:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7A9EF8D0054; Wed, 13 Dec 2023 14:03:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 759208D0049; Wed, 13 Dec 2023 14:03:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 586418D0054; Wed, 13 Dec 2023 14:03:58 -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 3936D8D0049 for ; Wed, 13 Dec 2023 14:03:58 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id F01A41602B7 for ; Wed, 13 Dec 2023 19:03:57 +0000 (UTC) X-FDA: 81562719714.30.9BE2714 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf24.hostedemail.com (Postfix) with ESMTP id 8D1DD180033 for ; Wed, 13 Dec 2023 19:03:54 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=F4ZYtp9e; spf=pass (imf24.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=1702494234; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=V5H5VveeMnDDzqbWQaVm9TZlhjPnJIl6dXPxA89NsM0=; b=tUmxxSMY9VXIp/vrjCnMGKC8z8ykyqws1SFVIugRPxTjgN9TZslOi2tEbQl05njNw4oohn itpHgrqoPTbgNzONXwecEmDatlP0jJBJwYPmWmXs5H2Vy/iHXXTP4qCnvR9ddrkYkKQ2Fj UJYhtPgGZ45fRnUrxS3YB232Q6d8P8w= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=F4ZYtp9e; spf=pass (imf24.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=1702494234; a=rsa-sha256; cv=none; b=JwdhmMhHaDYpH1yHsm5Idc6b7PMXP4SF6CTuzLWIdXO2lBN9BGeOhex6QE3buiZBkrjp+F FyAIInr5PpisNDd7oeYqqtnh8y2hCHhSdvIJA0WByuvk9YW//61owEfBmW6HismgFTpbij Vzcy8KdplYh3VI3etJXEIuD6J+TFIqw= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D1A2761F49; Wed, 13 Dec 2023 19:03:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBF17C433CB; Wed, 13 Dec 2023 19:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702494233; bh=KJAl103OAFoAr+UeUtJKB48jbALa8Ynn0eVxO6I87hY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F4ZYtp9e6u1S7vJVoTQuManLwGlrjOeID7BQLcnqFPRmQJPlm0o42k6kIz6uqAfU+ /HE5a9iWB/nCg4QL7ho2iGnYV78Rzv91bOo4uwfG8hwgqoniBuN+bYKp600U99SX/2 z4TYpYXhvBqmr2HXUHooXJ56cx0BIyv65XrswEfh3fot7+WOrwj6Dh0fGrxS/qXJ0d MwDbUOg8Llty3aCoY3Nb/Jb2XinjBJdNkkEJeB7L5Oujli7nQ2ACJPkBYBdVMKlALB XDyzklyW5EI8kshSqnJnQ21yO5J4ZdyD+hN/+Ljd+y7ttdyvcWB2x/pINClxdh92EA KiEA+aTGWd87A== 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/6] Docs/admin-guide/mm/damon/usage: add links to sysfs files hierarchy Date: Wed, 13 Dec 2023 19:03:37 +0000 Message-Id: <20231213190338.54146-6-sj@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231213190338.54146-1-sj@kernel.org> References: <20231213190338.54146-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 8D1DD180033 X-Rspam-User: X-Stat-Signature: fcnwsxaqic5xbi3fwc6bom5e8hu34dqr X-Rspamd-Server: rspam01 X-HE-Tag: 1702494234-132750 X-HE-Meta: U2FsdGVkX1/zMvWgmui3t4VBvFcirfHgNF0H9ylk5pC3sw9g0NCE65nPx/Y04P6BmgQOuhZaKFJpvopPoP5CDsrcbX5Nz8jbqyPmMYyZRSCWIP2Hc2neVNQzGpuhQ1s4yTRrjlvL8AAmY6CEsjtu7+8aa69OKBHEajWtSEU2/SC8Qi1hsBMrxGTD6bY36U8OvdYKuSf1G2iqIW5vR7giCXjRzVq8GKME5ZBuoiWFbidlGjxEW/tDWxBf+768LpMJHn2tVwkVk9Ffw1xsXttdM3/sJwv/6EIxMF8wjIfQZXa8agpvjzf/xwHSOqm3xeZoJuDOndSFk0xJMFgXlys1hIuO3RIQtDou32eHbHq2Xvv1qurx96dYquQoZ9oqXnO116RuWsvJpWdcv3ecdGW/cPGf7z55SD8jHX74MZT1Eqc+YUeBERiPLX1ftSREBMlx0mOTfrbtbWfINs7a3My7158ufoFtHAc2FDS6pfK95QfFyxifBW4QJoy93s4213daAprqOiv8luvhHobYgm41BMQfe2ZTl2Ak24aj6iKc8QGiQW/7WNQVkutPuuHfpPJxBgldMwdnRhSgBJxmy18JT8fU6PJ+xET/0irxizmxKkyd4mDxiX0AZ0JeA5RNXQYrsOjHxx7/qMEkjeriNXuaC8WC13L7pyAJqswO3tgR1IIaodIxz9XYranXI2JSJJuZi5rocGrnqhQzmL46HfNR/QsckhkJAFfb6K74P2+f3asZfqgiEmRQW+sJUGiZ64WPR2T8gA1FIWBGsnumO9Mdh8wBL8jHzR0oQpaNpGajVoXwPNQ0XSsYSaj1Ht2xm/E8D1NxLrHYMryHbdN8kduPxb2tg8C99rNdIWIseQI6pd/TaZU+NX3U+jgD2LAxDNicDD2/pNPQ1Mm+84RbIStQIhzndguOz+yd2LgwLwF3XRUeAPQPVL1GV6AHxaLRverMdxWhRzjSeA8MRlz9GQ2 GM9waSh/ 5f6XmNjRFxRKc0iK329NWG681aBYyIBJcu8qymZDzrtQwUzWAB1RggFYle4GfcJQ2vBLlJzrkg5ynGTTgxG2JzWqOq0brZyMrP0B5ApCR0WLH4N1Gb3RlbDaZ/G4zJluq9f9BCxbj1me8/eurllXgWF81kZUoj+Go6NQNJQArCPJRkKx5rFTzKLYvMVXjXj7jYlCeSqBrzax5BNgNqSnZgRyeSC8COvx5Bb+jXW5XzlWsAvxqUhuVl9N+lw== 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: 'Sysfs Files Hierarchy' section of DAMON usage document shows whole picture of the interface. Then sections for detailed explanation of the files follow. Due to the amount of the files, navigating between the whole picture and the section for specific files sometimes require no subtle amount of scrolling. Add links from the whole picture to the dedicated sections for making the navigation easier. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 70 ++++++++++++++------ 1 file changed, 49 insertions(+), 21 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index d3514367703b..671d3e50b998 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -59,43 +59,47 @@ Files Hierarchy The files hierarchy of DAMON sysfs interface is shown below. In the below figure, parents-children relations are represented with indentations, each directory is having ``/`` suffix, and files in each directory are separated by -comma (","). :: - - /sys/kernel/mm/damon/admin - │ kdamonds/nr_kdamonds - │ │ 0/state,pid - │ │ │ contexts/nr_contexts - │ │ │ │ 0/avail_operations,operations - │ │ │ │ │ monitoring_attrs/ +comma (","). + +.. parsed-literal:: + + :ref:`/sys/kernel/mm/damon `/admin + │ :ref:`kdamonds `/nr_kdamonds + │ │ :ref:`0 `/state,pid + │ │ │ :ref:`contexts `/nr_contexts + │ │ │ │ :ref:`0 `/avail_operations,operations + │ │ │ │ │ :ref:`monitoring_attrs `/ │ │ │ │ │ │ intervals/sample_us,aggr_us,update_us │ │ │ │ │ │ nr_regions/min,max - │ │ │ │ │ targets/nr_targets - │ │ │ │ │ │ 0/pid_target - │ │ │ │ │ │ │ regions/nr_regions - │ │ │ │ │ │ │ │ 0/start,end + │ │ │ │ │ :ref:`targets `/nr_targets + │ │ │ │ │ │ :ref:`0 `/pid_target + │ │ │ │ │ │ │ :ref:`regions `/nr_regions + │ │ │ │ │ │ │ │ :ref:`0 `/start,end │ │ │ │ │ │ │ │ ... │ │ │ │ │ │ ... - │ │ │ │ │ schemes/nr_schemes - │ │ │ │ │ │ 0/action,apply_interval_us - │ │ │ │ │ │ │ access_pattern/ + │ │ │ │ │ :ref:`schemes `/nr_schemes + │ │ │ │ │ │ :ref:`0 `/action,apply_interval_us + │ │ │ │ │ │ │ :ref:`access_pattern `/ │ │ │ │ │ │ │ │ sz/min,max │ │ │ │ │ │ │ │ nr_accesses/min,max │ │ │ │ │ │ │ │ age/min,max - │ │ │ │ │ │ │ quotas/ms,bytes,reset_interval_ms + │ │ │ │ │ │ │ :ref:`quotas `/ms,bytes,reset_interval_ms │ │ │ │ │ │ │ │ weights/sz_permil,nr_accesses_permil,age_permil - │ │ │ │ │ │ │ │ goals/nr_goals + │ │ │ │ │ │ │ │ :ref:`goals `/nr_goals │ │ │ │ │ │ │ │ │ 0/target_value,current_value - │ │ │ │ │ │ │ watermarks/metric,interval_us,high,mid,low - │ │ │ │ │ │ │ filters/nr_filters + │ │ │ │ │ │ │ :ref:`watermarks `/metric,interval_us,high,mid,low + │ │ │ │ │ │ │ :ref:`filters `/nr_filters │ │ │ │ │ │ │ │ 0/type,matching,memcg_id - │ │ │ │ │ │ │ stats/nr_tried,sz_tried,nr_applied,sz_applied,qt_exceeds - │ │ │ │ │ │ │ tried_regions/total_bytes + │ │ │ │ │ │ │ :ref:`stats `/nr_tried,sz_tried,nr_applied,sz_applied,qt_exceeds + │ │ │ │ │ │ │ :ref:`tried_regions `/total_bytes │ │ │ │ │ │ │ │ 0/start,end,nr_accesses,age │ │ │ │ │ │ │ │ ... │ │ │ │ │ │ ... │ │ │ │ ... │ │ ... +.. _sysfs_root: + Root ---- @@ -104,6 +108,8 @@ has one directory named ``admin``. The directory contains the files for privileged user space programs' control of DAMON. User space tools or daemons having the root permission could use this directory. +.. _sysfs_kdamonds: + kdamonds/ --------- @@ -154,6 +160,8 @@ If the state is ``on``, reading ``pid`` shows the pid of the kdamond thread. ``contexts`` directory contains files for controlling the monitoring contexts that this kdamond will execute. +.. _sysfs_contexts: + kdamonds//contexts/ ---------------------- @@ -214,6 +222,8 @@ writing to and rading from the files. For more details about the intervals and monitoring regions range, please refer to the Design document (:doc:`/mm/damon/design`). +.. _sysfs_targets: + contexts//targets/ --------------------- @@ -221,6 +231,8 @@ In the beginning, this directory has only one file, ``nr_targets``. Writing a number (``N``) to the file creates the number of child directories named ``0`` to ``N-1``. Each directory represents each monitoring target. +.. _sysfs_target: + targets// ------------ @@ -255,6 +267,8 @@ In the beginning, this directory has only one file, ``nr_regions``. Writing a number (``N``) to the file creates the number of child directories named ``0`` to ``N-1``. Each directory represents each initial monitoring target region. +.. _sysfs_region: + regions// ------------ @@ -265,6 +279,8 @@ region by writing to and reading from the files, respectively. Each region should not overlap with others. ``end`` of directory ``N`` should be equal or smaller than ``start`` of directory ``N+1``. +.. _sysfs_schemes: + contexts//schemes/ --------------------- @@ -276,6 +292,8 @@ In the beginning, this directory has only one file, ``nr_schemes``. Writing a number (``N``) to the file creates the number of child directories named ``0`` to ``N-1``. Each directory represents each DAMON-based operation scheme. +.. _sysfs_scheme: + schemes// ------------ @@ -310,6 +328,8 @@ Note that support of each action depends on the running DAMON operations set The ``apply_interval_us`` file is for setting and getting the scheme's :ref:`apply_interval ` in microseconds. +.. _sysfs_access_pattern: + schemes//access_pattern/ --------------------------- @@ -323,6 +343,8 @@ to and reading from the ``min`` and ``max`` files under ``sz``, ``nr_accesses``, and ``age`` directories, respectively. Note that the ``min`` and the ``max`` form a closed interval. +.. _sysfs_quotas: + schemes//quotas/ ------------------- @@ -369,6 +391,8 @@ metrics for the values. Note that users should write ``commit_schemes_quota_goals`` to the ``state`` file of the :ref:`kdamond directory ` to pass the feedback to DAMON. +.. _sysfs_watermarks: + schemes//watermarks/ ----------------------- @@ -388,6 +412,8 @@ as below. The ``interval`` should written in microseconds unit. +.. _sysfs_filters: + schemes//filters/ -------------------- @@ -483,6 +509,8 @@ and query-like efficient data access monitoring results retrievals. For the latter use case, in particular, users can set the ``action`` as ``stat`` and set the ``access pattern`` as their interested pattern that they want to query. +.. _sysfs_schemes_tried_region: + tried_regions// ------------------ From patchwork Wed Dec 13 19:03:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13491788 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 A841FC4167B for ; Wed, 13 Dec 2023 19:04:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1B77E8D0055; Wed, 13 Dec 2023 14:03:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 11B388D0049; Wed, 13 Dec 2023 14:03:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E5E7A8D0055; Wed, 13 Dec 2023 14:03:58 -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 D40498D0049 for ; Wed, 13 Dec 2023 14:03:58 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 78819120314 for ; Wed, 13 Dec 2023 19:03:58 +0000 (UTC) X-FDA: 81562719756.20.658E849 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf24.hostedemail.com (Postfix) with ESMTP id 9FC57180032 for ; Wed, 13 Dec 2023 19:03:56 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=CmocNWl3; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf24.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 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=1702494236; 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=z5ZZL030cjbFKJESoqIXvbN6aND0RDo6Xr5J0iXaGuI=; b=Qwx9ExE41kliHUR5wXC5u9e1NCQbkE26z8S07L5hJ0y6aMeAvhS3HMad4DP8I6F5izldRI Go+vqNZT7IPE9GQn1HmZwGbXMqv5HhVmxBGkyFQv2GO+m5NVe6nQ9gTGV0maOPizl55SrM x28mJac0sZB/5Lb2i1qlcoV441bWqiE= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=CmocNWl3; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf24.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702494236; a=rsa-sha256; cv=none; b=T53yq0KZoXYOYq2EKvpOqhZ4/AekJoUNW2M+aTF1qrkZVVINDhphpbN1bLjJ6zcKkJsHJK 7V8X0yKeaCWDfZv56FhANcKl+ftBjBVk1X+1+2quYACnge9JthdOWgeZGri2URfjXzdoxZ Jw5UFV48EF1q3OmnL4MsbYFSgzEcNgs= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 553F4B81F22; Wed, 13 Dec 2023 19:03:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70EBAC433C9; Wed, 13 Dec 2023 19:03:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702494235; bh=kQlCzt4zp30gEmZhugHeoZj6PZuokXzF1ZrH8vPgcLQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CmocNWl3Jdc8Dqs1hBubEL4b1RStm9nRj5Jc2Rli1sDWRw7vuP4QcTV6z46jKUSqC PthmZ9WuzR3CbA9bZpzGCeRTfCbZwSNr1Plrlqvrz98vJiLjZ8LWKhUzXpYLrkRidG FviqdxoXZhJhX4hOQNnGgUXBqfppAvzUTy3lwoT0Cl2+v17BHIWFeLyZ9IIoxShOmI Yhem41ybWkVGEKSAmTaYfcsCYXKU6DEklVlGKg5MABzCEaBqfIH9kPymXnu2UAeAs5 Ec8qOrOwG2hnE69hrDDgp8ETY6MQgORm/i6Bkl9B4OtZXYhYgxKev6q87rVzLlB4Mu lfdW8oBINHfEw== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Jonathan Corbet , damon@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/6] Docs/admin-guide/mm/damon/usage: use a list for 'state' sysfs file input commands Date: Wed, 13 Dec 2023 19:03:38 +0000 Message-Id: <20231213190338.54146-7-sj@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231213190338.54146-1-sj@kernel.org> References: <20231213190338.54146-1-sj@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 9FC57180032 X-Stat-Signature: dbcubp3htq5476pxgp44m7bxse5khhkm X-HE-Tag: 1702494236-754765 X-HE-Meta: U2FsdGVkX1+av5qwubDOzPJyr1JISUZu6JVtpK+YtvOcklT20GjXiN5Sl1pkKPLtDAvk9vsNAp57K7mUU8a/O6t2EjC7pcHk0nL+XitybYNwGnCvWy0iM7yLNpfbR1/WLEP91OuoDYSypcBnw6IL0Dw638dM3u0ay4ZOq0A7Yp5YjiDBwj28/GASSfPEOWZcAooeXTpUEDT6sGFOJz+eZHG47GtduNvPfdsI02eOtvUHDqpeaaNNadA25wzco5XJdlomYmhfPnPJ5FGY06c272YFX8M1YykVXw5Kqf7PCpAUwg9tVNWAFgOfmNe8ag1BG3Lt9j1afkXBdTnWleNOvo8QJbAVKBUM2zQE9fsfzOcwIBlGsCXogRlbf1gK5gg6W4RYjDStH5YpLyoEohecHGkVAy0FD7owh5lW8GMylsrWXCAJfjTyjYKAAO5Z/9jG8cDBXhKCWDmQ07uPkFKq22S/xtO8SO3IOwBWwUF4M7Zbv5Oib/wwwk/gUeACi7i5J7YvmJymxBdVFASwGgttA+aYMD22ZeEH9WHeZrCLLRMhq2KIPwro5BuaxK4xve5JJQd0DGrsHGLMVp80/9HVW8POZYl7xTwNyC1joIWTQF7Sx1gk28V1cnwd/TBFGdIDNaPH1gpXxQ3TtyTVeBw0EW5jrjLmh48aMqQTq29mn2n30zjpow1MODTUuDtgHlCmajHC1sK8sFe2KvzdGmRvCTrQYe1618F6/duBL5fJQaGcqjYfH/QHbuJD3k4LcxXXmzgWG3tGdxrML36uxxa0rw6Cxm4tIxnL1mFEmDxpqbRcFW6Ci8QZDW4fD1HpDomsGyL/rUX8KAdO/JWfNDBe6uDcVlMOmCw5VAKqLz4cm3XgVp4YD4Rl2srzR5ESGszkjMNOzjVfXbaPMu/PblhGdWv3vSBS6wl7NEHzd9G8c81/EByjrwtdIuV1h7i4IcETfTkzjfhJCFsZ0b1KFbe 7JyyoY8d FJMzARiXUlwSg/2xlI2mUbLrPshxOcftNT94tENRtPCPNA6rmO09FtXFgnrGX0nX5WzBK9PoyL+7Caioc+ntYZ0niO0IR4TS/w4dsv90dqQxTikR8kP8PlAMT+Tm5g69lq4USCYbCzqplGYv/MZDSxUX7AthRXX16RwnUhMbOJeIoubZTh1bDpD9He6nMMaTEJMNzK7dpyY3JeXHpQLAd3phV5cQjHXNVQjqoGUb51EvoeXsQ/7MHZL41GYytVJiKcZgIKH47uFGj6R8= 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: There are eight command inputs for 'state' DAMON sysfs file, and those are verbosely explained in multiple paragraphs. It is not easy to find explanation of specific command, and getting whole picture of supported commands. Replace the paragraphs with a list. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 47 ++++++++++---------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 671d3e50b998..9d23144bf985 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -130,30 +130,29 @@ In each kdamond directory, two files (``state`` and ``pid``) and one directory (``contexts``) exist. Reading ``state`` returns ``on`` if the kdamond is currently running, or -``off`` if it is not running. Writing ``on`` or ``off`` makes the kdamond be -in the state. - -Writing ``commit`` to the ``state`` file makes kdamond reads the -user inputs in the sysfs files except ``state`` file again. Writing -``commit_schemes_quota_goals`` to the ``state`` file makes kdamond reads the -DAMON-based operation schemes' :ref:`quota goals ` -of the kdamond. - -Writing ``update_schemes_stats`` to ``state`` file updates the -contents of stats files for each DAMON-based operation scheme of the kdamond. -For details of the stats, please refer to :ref:`stats section -`. - -Writing ``update_schemes_tried_regions`` to ``state`` file updates the -DAMON-based operation scheme action tried regions directory for each -DAMON-based operation scheme of the kdamond. Writing -``update_schemes_tried_bytes`` to ``state`` file updates only -``.../tried_regions/total_bytes`` files. Writing -``clear_schemes_tried_regions`` to ``state`` file clears the DAMON-based -operating scheme action tried regions directory for each DAMON-based operation -scheme of the kdamond. For details of the DAMON-based operation scheme action -tried regions directory, please refer to :ref:`tried_regions section -`. +``off`` if it is not running. + +Users can write below commands for the kdamond to the ``state`` file. + +- ``on``: Start running. +- ``off``: Stop running. +- ``commit``: Read the user inputs in the sysfs files except ``state`` file + again. +- ``commit_schemes_quota_goals``: Read the DAMON-based operation schemes' + :ref:`quota goals `. +- ``update_schemes_stats``: Update the contents of stats files for each + DAMON-based operation scheme of the kdamond. For details of the stats, + please refer to :ref:`stats section `. +- ``update_schemes_tried_regions``: Update the DAMON-based operation scheme + action tried regions directory for each DAMON-based operation scheme of the + kdamond. For details of the DAMON-based operation scheme action tried + regions directory, please refer to + :ref:`tried_regions section `. +- ``update_schemes_tried_bytes``: Update only ``.../tried_regions/total_bytes`` + files. +- ``clear_schemes_tried_regions``: Clear the DAMON-based operating scheme + action tried regions directory for each DAMON-based operation scheme of the + kdamond. If the state is ``on``, reading ``pid`` shows the pid of the kdamond thread.