From patchwork Mon Jul 1 19:27:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13718587 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 B193CC2BD09 for ; Mon, 1 Jul 2024 19:27:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 930476B00B1; Mon, 1 Jul 2024 15:27:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8BD7F6B00B4; Mon, 1 Jul 2024 15:27:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6BEE96B00B5; Mon, 1 Jul 2024 15:27:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 42B7F6B00B1 for ; Mon, 1 Jul 2024 15:27:19 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 0349A81DA3 for ; Mon, 1 Jul 2024 19:27:18 +0000 (UTC) X-FDA: 82292167398.08.6096F29 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf20.hostedemail.com (Postfix) with ESMTP id 57C881C000D for ; Mon, 1 Jul 2024 19:27:17 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=pSsroV1U; spf=pass (imf20.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=1719862015; 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=128kRLf0mkrncut17EAfiMaZSp77EcisGN+6pPWaJSA=; b=foT3MNS7QVC1cAtotBvQslfJ90wji8+nQ0sYY4QhU09MM3GLeXW3+1YeaYDKXkAjsNwCWd tCLOtEiW14aJhOB7QnaBMiXEYPStE2xI6zFoNXTZDyaHfDAvvTEASYTtjOznBI6haZk1L6 XDIQqCIjp+8OJqqm8eo0CAGGB7uV/vM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719862015; a=rsa-sha256; cv=none; b=oanRC/qkBdkUnPQzq/VC+xqahrtEpCCqppVA2dF6PY/NYgE/uZMwcNaBy8JqZPcc5ydYG7 wXg07rVJfUz+lDx+moNx/WIo3I0ZjA+k9qjkl4uThZqhq63UHpucveTzUum5bvnTQ8Qtb/ hre/891qk9XqlG5pWR9Fa1V0I7Lo7bA= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=pSsroV1U; spf=pass (imf20.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 89B40617A3; Mon, 1 Jul 2024 19:27:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA5A9C32781; Mon, 1 Jul 2024 19:27:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719862036; bh=ZnT7QNZiiuEpgT4tYIiBE2EHtfYlH/fKceMtToSKPPY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pSsroV1UZFnezFKy/slb8Tj9vjjvce9bJP1JFpky/QnyvTug16ElPmCjL3vuaEElJ KBiRty1iMUl4AxQEwHmBZvyUoIv63L6CIVHl7ROUWYQeriAs71CzH08x+HURlSu2iD CtY7nQ6GBZGqEfD4ACjHSbSCvTkmdDdMYCObfGAn3y9qF35ky7tK3Wl8KmrEu5ThBF pr+3V3cFw8Nh3WcaWsD+bVvVK5rtsjxqZnWLQrr2LSRfARIc1dCZN9WeM5ufvS9VWa 5A7IFxxUNyTKPZkgFxBBk7V4tsanJHQwfcegLxhG0KN3GSNvUrDl3xjmwZtc99Tbg8 4MzdcmVCUVEbQ== 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 7/9] Docs/mm/damon/design: add links to sections of DAMON sysfs interface usage doc Date: Mon, 1 Jul 2024 12:27:04 -0700 Message-Id: <20240701192706.51415-8-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240701192706.51415-1-sj@kernel.org> References: <20240701192706.51415-1-sj@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 57C881C000D X-Stat-Signature: em4ffh1yayyp7ib7d7dxw6tece3reghy X-HE-Tag: 1719862037-860058 X-HE-Meta: U2FsdGVkX1/tVeU+t1r7ot9EV1/TrsWTw+EmWlFQnm44mUArxMBLPvwRkyC4rPVkd+0EfRXyVZF5OrppvR5sjkFA4yAtKIJiEd/Ovcd8Y1QMKyPw/uZtrzH8/9xfz0QHivsd+N2lQ359tA1SulqvE/gsnqn+2ivg/3Azzg15pWLYcu1oqkiUNyCs6+Ao9BdykHL7SNitGE47wdHAnNj3Mv0/L0U77q9G6bC6AM0MNQnK6jkyf2ScjanorhE8HMTO90mmIiR4lzDtkLzf1Al8IcrQ7utxoG4CdxGQD4nyv7XgdMYLDLVB1WNCFRRvX0yZWcbXo8STdHwBGiPkB5DmL5WJY4tdfADvRSPYIYKmjo9uVNcUb6xod4HQXo53NkRPJUpRlSmEx016gSepJBPfaRkg9sSlB5xAXCGZhRPfoOnewvaomw/t9N/NNEStoOxIMbKX8I2QAWdMISWwJ1GB8WhOLjGWgmEYLIKrBdVdM650S+UpHfnzbvUQQt4v6XkxzPOWuUD7pfARwQ4KuurHzonWbcW4uNyvlWPo9A0MVJIJiNpJTFG2AurCJnviF+QOO2V9ehnFLcrTYUTvXMMGbjpmB9H5Pzd28DTdnIvu5MzC72jVcFiiK0dZb6dOnmTnFgvmJuQkJ9C++Tc43JDJBMCvhsCEvkc19hQQLHxgNjWnnObY70HfHUXSDYCjXdpKLYIsO4E4M0vuh4ajMCFnsOiVNg7k6urIwdSNt/vVwEhs//6Y+S1nZSDFSaK1xgOSYRi0u1zcEW8Z+iQPyGMpOQCrwQ5hRtbZMCzrJBObPDflHN4axk3IfLZ0yJIvNNBcEpyyJ6TtzN9C3r+TkBO4f78Up7q5Sd9S+e9k1XK95+mkqf6quyGBtiHkkPGj8hRSecQdiRRrU+ZmYVmwOkB3Ik9uy/eyvIfZa4TCyUbj3JAuI8Emg126kcOaFV/KEno/VE2ZWr7DJp8qcsutA21 wWQ5DewS TnqSV9hr8UcftAdYgLPuoU5x9RcljETpSgGK5uQIMWlREDPFbISnb+5PBnL2/h5ZTe8+0R6zjCzpYrkba+8bFTqGYlsJotOb2LMKJ6MY82ESkDA19VZSkM0FPAnFVs4d254so7VmVcAbDJPdOSPrQ+VgF5IzsoUt/+jetr++LAxuOVSXfHs19DqEqTuKiPbiOSSqZvwIFqmnmiKn2W7ua4GG4TXkGpW35InxhMDzUl7V1FVo= 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: Readers of the design document would wonder how they can configure and use specific DAMON features. Add links to sections of DAMON sysfs interface usage document that provides the answers for easier browsing. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 39e686c6862d..89f5330e003f 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -16,6 +16,9 @@ called DAMON ``context``. DAMON executes each context with a kernel thread called ``kdamond``. Multiple kdamonds could run in parallel, for different types of monitoring. +To know how user-space can do the configurations and start/stop DAMON, refer to +:ref:`DAMON sysfs interface ` documentation. + Overall Architecture ==================== @@ -71,6 +74,10 @@ describe how those work. - fvaddr: Monitor fixed virtual address ranges - paddr: Monitor the physical address space of the system +To know how user-space can do the configuration via :ref:`DAMON sysfs interface +`, refer to :ref:`operations ` file part of the +documentation. + .. _damon_design_vaddr_target_regions_construction: @@ -143,6 +150,10 @@ monitoring attributes, ``sampling interval``, ``aggregation interval``, ``update interval``, ``minimum number of regions``, and ``maximum number of regions``. +To know how user-space can set the attributes via :ref:`DAMON sysfs interface +`, refer to :ref:`monitoring_attrs ` +part of the documentation. + Access Frequency Monitoring ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -246,6 +257,11 @@ and applies it to monitoring operations-related data structures such as the abstracted monitoring target memory area only for each of a user-specified time interval (``update interval``). +User-space can get the monitoring results via DAMON sysfs interface and/or +tracepoints. For more details, please refer to the documentations for +:ref:`DAMOS tried regions ` and :ref:`tracepoint`, +respectively. + .. _damon_design_damos: @@ -286,6 +302,10 @@ the access pattern of interest, and applies the user-desired operation actions to the regions, for every user-specified time interval called ``apply_interval``. +To know how user-space can set ``apply_interval`` via :ref:`DAMON sysfs +interface `, refer to :ref:`apply_interval_us ` +part of the documentation. + .. _damon_design_damos_action: @@ -334,6 +354,10 @@ Applying the actions except ``stat`` to a region is considered as changing the region's characteristics. Hence, DAMOS resets the age of regions when any such actions are applied to those. +To know how user-space can set the action via :ref:`DAMON sysfs interface +`, refer to :ref:`action ` part of the +documentation. + .. _damon_design_damos_access_pattern: @@ -347,6 +371,10 @@ interest by setting minimum and maximum values of the three properties. If a region's three properties are in the ranges, DAMOS classifies it as one of the regions that the scheme is having an interest in. +To know how user-space can set the access pattern via :ref:`DAMON sysfs +interface `, refer to :ref:`access_pattern +` part of the documentation. + .. _damon_design_damos_quotas: @@ -366,6 +394,10 @@ feature called quotas. It lets users specify an upper limit of time that DAMOS can use for applying the action, and/or a maximum bytes of memory regions that the action can be applied within a user-specified time duration. +To know how user-space can set the basic quotas via :ref:`DAMON sysfs interface +`, refer to :ref:`quotas ` part of the +documentation. + .. _damon_design_damos_quotas_prioritization: @@ -393,6 +425,10 @@ information to the underlying mechanism. Nevertheless, how and even whether the weight will be respected are up to the underlying prioritization mechanism implementation. +To know how user-space can set the prioritization weights via :ref:`DAMON sysfs +interface `, refer to :ref:`weights ` part of +the documentation. + .. _damon_design_damos_quotas_auto_tuning: @@ -422,6 +458,10 @@ Currently, two ``target_metric`` are provided. DAMOS does the measurement on its own, so only ``target_value`` need to be set by users at the initial time. In other words, DAMOS does self-feedback. +To know how user-space can set the tuning goal metric, the target value, and/or +the current value via :ref:`DAMON sysfs interface `, refer to +:ref:`quota goals ` part of the documentation. + .. _damon_design_damos_watermarks: @@ -444,6 +484,10 @@ is activated. If all schemes are deactivated by the watermarks, the monitoring is also deactivated. In this case, the DAMON worker thread only periodically checks the watermarks and therefore incurs nearly zero overhead. +To know how user-space can set the watermarks via :ref:`DAMON sysfs interface +`, refer to :ref:`watermarks ` part of the +documentation. + .. _damon_design_damos_filters: @@ -490,6 +534,10 @@ Below types of filters are currently supported. - Applied to pages that belonging to a given DAMON monitoring target. - Handled by the core logic. +To know how user-space can set the watermarks via :ref:`DAMON sysfs interface +`, refer to :ref:`filters ` part of the +documentation. + Application Programming Interface ---------------------------------