From patchwork Fri Jun 16 19:17: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: 13283220 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 5E7A3EB64D8 for ; Fri, 16 Jun 2023 19:17:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 410948E0001; Fri, 16 Jun 2023 15:17:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3C0316B0078; Fri, 16 Jun 2023 15:17:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2ADD88E0001; Fri, 16 Jun 2023 15:17:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 216276B0075 for ; Fri, 16 Jun 2023 15:17:52 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id CC916C0D06 for ; Fri, 16 Jun 2023 19:17:51 +0000 (UTC) X-FDA: 80909570742.06.BFDF0DD Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf14.hostedemail.com (Postfix) with ESMTP id 2C77510000A for ; Fri, 16 Jun 2023 19:17:49 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Qr2d0sNY; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf14.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=1686943070; 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=ZOA9Y3WaxSy0wQxXiJlLMJbVdTR4WHvdGzBT7/g3vag=; b=e6Ll5RbcVU7uIQdDvkoHyFeJM1BNjKmTACA38Xvit9YXFc4r9Dv3saNJAeS1ull9C3K+nF Dlz5dVIWFoKuW13ot6F5yvbcC0zb5Y+CfQcLE9+qQuLNaeCwe/lWp58yTFuLPSp7ujPWg4 L1FgZSsCcRTY/3HvgSycV+tTO+dCjv0= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Qr2d0sNY; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf14.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=1686943070; a=rsa-sha256; cv=none; b=Gaji4FS8MsivvACN6IMTDC3N6D0Rwm03uO4TVhkvGptrpogKdbwO3H55RBTMkgqomncQoY 4wU2YRH5Y+hkHEbcKeqByIMDKB0vWl4WOpOUWq2VHx3QPU6IamBqXGcNfT3ul5LXDW3UP2 UfIik2teQSQ9UAeWmGuUqsjk8mgIMdk= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 57E2263CEC; Fri, 16 Jun 2023 19:17:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36B0FC433C8; Fri, 16 Jun 2023 19:17:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686943068; bh=l86JWMdvVZwYcsvalUMuaAJbJetoG2ebBMyTen7o1Uk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qr2d0sNYjVXHU2h2cqGjllyRexevn0t+autu/4Fqlk1gSHpY9elRfUlnnfCb22CC/ RK82KqUj8pDaUCmh8ryWEwzBGIbYN/6c2k397K0rPqsiIJVrhl8bRsXwM+Q78JRv7U 269xagijYdqtqDx/F8VEPtQGJpO3G9VdcRPTHE7by+L7mas3ZcuFDLHQ/99JVsSxyz 1Kn6h1liPOopyFtjUysuO9LFXG0UUSTxBzLoEt+If/QMY8avmU1cTkUNdeHFmSfZeS EpLAqipTwBQROZWN92bRjNy+hxtQe1Alu/SJN9XXXeudr8b93h5JkbgExk1uMLmDFB MjbTIMb3ILl1g== 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/7] Docs/mm/damon/design: document 'age' of region Date: Fri, 16 Jun 2023 19:17:36 +0000 Message-Id: <20230616191742.87531-2-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230616191742.87531-1-sj@kernel.org> References: <20230616191742.87531-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 2C77510000A X-Stat-Signature: rxngastsnfek7b6cx3rcsa8j5mikfbhj X-Rspam-User: X-HE-Tag: 1686943069-754289 X-HE-Meta: U2FsdGVkX1+ZhI0yZkx8aIyRDpl5vUYbasC74f6JIO7kCByLeOG5gPjsSCIIpuRaDFB0Id4PmwjhB4pFj8TyXiUjauHqH7Jayo0CDsfKuHWm78FUbQlSTrVVBJUB9BXkiXSGeuWc147ctaK7FmuA0TKnM+JSmqI5vdMvHyOihIoHcW8BM+UtkXCTW7qibnBCXKzng4GXVaoMA29uHaRWrht58oa5AbP/xHSlNwTMJ7W1+3ovhxUUn/mkAitU9ORfZ0L7H8+EHpWy6pjY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spamicity=0.000040, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The 'age' of each region in DAMON monitoring results is an important concept for both monitoring part and DAMOS. And DAMOS section of the design document is mentioning it. However, the age itself is not explained in the document. Add a section for that. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index da110e89cab4..a98af99bb705 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -190,6 +190,20 @@ In this way, DAMON provides its best-effort quality and minimal overhead while keeping the bounds users set for their trade-off. +Age Tracking +~~~~~~~~~~~~ + +By analyzing the monitoring results, users can also find how long the current +access pattern of a region has maintained. That could be used for good +understanding of the access pattern. For example, page placement algorithm +utilizing both the frequency and the recency could be implemented using that. +To make such access pattern maintained period analysis easier, DAMON maintains +yet another counter called ``age`` in each region. For each ``aggregation +interval``, DAMON checks if the region's size and access frequency +(``nr_accesses``) has significantly changed. If so, the counter is reset to +zero. Otherwise, the counter is increased. + + Dynamic Target Space Updates Handling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From patchwork Fri Jun 16 19:17:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13283221 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 0D95CEB64DB for ; Fri, 16 Jun 2023 19:17:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5A2548E0002; Fri, 16 Jun 2023 15:17:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 522768E0003; Fri, 16 Jun 2023 15:17:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2AFC56B007B; Fri, 16 Jun 2023 15:17:53 -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 1D2A46B0075 for ; Fri, 16 Jun 2023 15:17:53 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id EC2F580D75 for ; Fri, 16 Jun 2023 19:17:52 +0000 (UTC) X-FDA: 80909570784.29.DD98148 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf07.hostedemail.com (Postfix) with ESMTP id 4727B40009 for ; Fri, 16 Jun 2023 19:17:51 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=pjRyPXBj; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.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=1686943071; 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=tDssXFzBfTQBf1iQwsSfccJcdCXTNZxoUGwyfZL6uNc=; b=3fbjIUYKWS03zYHWMWlF/whRkbhnTwpJSp3m+M09WCu7DNgGquq7fehGVpoZbSI1kYKhv2 esjBytkxZf5PiJBs5VLQR+yfnURYVdeiAtZsN8l83Km+BxmZALUgzjcoQNGQgdke1WNspe PG7w2l7/sCxxxNpoZtzDIgt/pbFtfCI= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=pjRyPXBj; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.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=1686943071; a=rsa-sha256; cv=none; b=2fvHnwVR74Gt8VJMxvWNyw+imYNgR21HvQj833e9Vy52vYc17EckbtilfktwT1PSbJjBzo sgwhL9MZ3eb8GRx2qdYZCe4HYm72/Oo1khdwcaQazYws9OfijaOghh/PP1uf6SjcpLQS2+ pagvdBYwLMrvgPzaz3HDEnov6lRSkMw= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8620163F01; Fri, 16 Jun 2023 19:17:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00E20C433C0; Fri, 16 Jun 2023 19:17:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686943069; bh=LvC4YT4/e0KgspEdK+7PadxzOaV+ZKDN40FmhrIY1TE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pjRyPXBjPdmD/CCyo3c/TOJEl8Pc/wVwxfP/HY+a9sa6wUtE1ECgVtVOC0x4Dm/EZ /FBoIRXKO64a0/wO29ZO4g1VWHNl4FtGc08wRZkiCOXa9vgfri7swZffPkGk1mlY4s 2bzaL1IeFZdWGH2AtwoG651fSafZC15/aa/H/OTI90JKO07q82eEgVXnqkwvIMkwyx /n8msXEZh2z8+ptNjDMD5vJQRYUOEhjW93jFNuQbPZ9asQRgRXDBuSXDo5EaQsSGQ4 l2v9YABAJtr+MjpYWV0t4y8pIOqxzmot/AkRtdU2KHUxTWA3rIuQEx092Tlf8UZpY4 nRF+N3RE8K5Ww== 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 2/7] Docs/admin-guide/mm/damon/start: update DAMOS example command Date: Fri, 16 Jun 2023 19:17:37 +0000 Message-Id: <20230616191742.87531-3-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230616191742.87531-1-sj@kernel.org> References: <20230616191742.87531-1-sj@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: p4id337jpb8cezwz7ikcofocmpkqgi7j X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 4727B40009 X-HE-Tag: 1686943071-857165 X-HE-Meta: U2FsdGVkX19INZPiCozLzShUzJ5D0MyitUCN20SOAR+3UE3EDAtXmZO3AVsoCbbKN7qznYPoSO7wcWajUVJ4vsCx0TNodtmjg7ARaUXhkXVsWkL+Yt1liCLy8CQSUKcp6nX9+9t27pmIH3Gm9oKGAm5y3p3UTMptPYOq8oIAMSjdwfCkubEJim57hc1/tbsqutZonMG3TEp2c45Xj0HR/UiVoSGK0keDpPOgPstrD7WKJAcrzw/oTfhUiGzS5hx4Z4gcJJX8kqwqErF1hVe9Rs9vQ+MHh7RgJm7TUHwFFzQKdEOsvxXjxtciGv3wkS3I0w9IcHEiLGaY4PgJGIyFAmPzQKHDOCDhq4RiURrCBELTf0RXOeyy3k/m5gUu+lKsRV/r+aEzKJptUEWK1lkWM2VJWhfwkZJfsJcf+LiJJsHWf8LLo7/eoxIi8SC/lHnINwX6jutiXdHF3HAqNkVUQhdi5BqAQQ5aKeo93fFVoUFG2iYKUNk6pRWsC3V6aH8kLOPD9CRtSGnbuphKpHKtTQ+MUoNYKheeSWBEwTZMtueU2mMtB/ggHB3Mqnz3tajGHTItgIQ3gEQq/P5Fff5P5h1hGytyKjhg8TLDMlYAkuOuqrIU5c3ntwvD4kIn+U/b0RqvaoKRFX/hO+mOE0Ftuj86xJ56Eb+0ZqdKSyw0pvhAzcAQAdScuktMzySFtty1r+28VOFQ+dnd6O6cK/vJUQfp83NLpcFtTGT8I08xeMtl39qVA7Vd7i27k2V4DcZjJSAatxBaxKoM2ldbpQJRJYZlSRogLD9+plu0Ewkd1EpDSMljd21+Ndzvx/j4nE0ugE1WrTJRtIj7DNhpI/r4UFOzPizVPvNSNBq1bWhV2CBd6vCckxiPGd1SGaQ1Tbte4oLBw66ucmoj7oZUYweoXRytmURvCLRBQsQjMyw+MdGttayFu3iQKiG91xiVOVeoKnMEWBgrS+8FnTDTr31 GeOwSjAV 5Rwhx+4aG6WOAYOo19DD3VBD+1UDciifX5AEAGt5R86b1khZNfsStDK2KeceUfb5a5XohzsHs8bbGQK+im4bPg7GDW/x7sOQB6+gE1TwAprvvuAd10//re7gexUYICLdv0ju7agtk/exP9p1rD9aZJbwKQzgC7r5fJg8ea8HA/3ebj6fomjuQ1AO9+UwGglCManX+lNjMBRgjVkVsQDcxVZnsmQ3I9aOfqoglmvcMFHo+WrjtEWlWc8GndbV8J+dcXeRAbwcZnVuLJPKxjMR01Fdng6CzPlGK9uJKtPk16CdsmPgcjX+ySVesCnJ9wDEDW5IjXrOQyWkav1Hxexi30tDK2WZd/ZySlCzZoekCjXT4sZE= 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: DAMON user-space tool, damo, has deprecated[1] its old DAMOS schemes specification format. However, an example of DAMON documentation is still using it. Update the example to use one of the alternative options. [1] https://github.com/awslabs/damo/commit/e9950ae68f6c Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/start.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/start.rst b/Documentation/admin-guide/mm/damon/start.rst index 9f88afc734da..7aa0071ff1c3 100644 --- a/Documentation/admin-guide/mm/damon/start.rst +++ b/Documentation/admin-guide/mm/damon/start.rst @@ -119,9 +119,9 @@ set size has chronologically changed.:: Data Access Pattern Aware Memory Management =========================================== -Below three commands make every memory region of size >=4K that doesn't -accessed for >=60 seconds in your workload to be swapped out. :: +Below command makes every memory region of size >=4K that has not accessed for +>=60 seconds in your workload to be swapped out. :: - $ echo "#min-size max-size min-acc max-acc min-age max-age action" > test_scheme - $ echo "4K max 0 0 60s max pageout" >> test_scheme - $ damo schemes -c test_scheme + $ sudo damo schemes --damos_access_rate 0 0 --damos_sz_region 4K max \ + --damos_age 60s max --damos_action pageout \ + From patchwork Fri Jun 16 19:17: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: 13283222 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 D2514EB64D7 for ; Fri, 16 Jun 2023 19:17:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 802166B0075; Fri, 16 Jun 2023 15:17:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 770208E0005; Fri, 16 Jun 2023 15:17:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5996B6B0075; Fri, 16 Jun 2023 15:17:53 -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 40B258E0002 for ; Fri, 16 Jun 2023 15:17:53 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 05482160B93 for ; Fri, 16 Jun 2023 19:17:53 +0000 (UTC) X-FDA: 80909570826.25.238ED56 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf27.hostedemail.com (Postfix) with ESMTP id 506BE40010 for ; Fri, 16 Jun 2023 19:17:51 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=JYrW9cm+; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf27.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686943071; 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=YVZscyI3LUfRd82qftgm8lyoq62YjymKi21afxT5CmM=; b=kNOTTO79r6e9alqzN6OunVwU1DO1JN2iGj+8R19h+Zyf+BMDEfrF6uj+Vb6qfEd5+smdlk Nxg+XtRZXqlz8bJ4KiY5w4Rn8tqjvchZ2NTMHTW0HNeP3/WG/On7PQ+9D0+zw3QrpS3ELc hDYZ3trE/A4vLnZAGg2JKiqBZa3bHTo= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=JYrW9cm+; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf27.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686943071; a=rsa-sha256; cv=none; b=MN2iDQU5aZuT/URLgg9oj8ThmWGSy740P4S7lwOnQ1ZslwfDTNW0fXB4eq0O7QGQbDpZ5y UPn+rEp+A5V+Q5qrfLMo6eZAHybcx9sa/ySFInIoEo9hW9Ufq6WOz7ACDcDEi8kVIcgoHb jdbjNyNk/2+JiEr75IndZfJP4Ovv9Ck= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6339563EBA; Fri, 16 Jun 2023 19:17:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B05F0C433AD; Fri, 16 Jun 2023 19:17:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686943070; bh=/PqkZzi3PmcfmmQ2ShVZNSPJIc3ayquVqki2elLWBA8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JYrW9cm+OeRlKwfHbXjV7uGo3r6/53L5aXiZpIgz9CbhooZv0svdwy3KG+3gjDviP g600JjZC6WGUBJ8Ao8i1vOS2ef8fe5HL8Lo09xnPJqvawnLxGJ0BNLOdtS2DU8XbFO rqsM6NTwxkupSgRKVY5wiICRb1Xm/+peHg+PaUjmquV+CCNy1GffAX0B36347W3rEt tkj2wQOlIH3EAfsXY2L5KW01rNcwYCBJ1DrsIa8IR8iB9m6goXGF9JtfflAE03appl 8ESApdmB5BaL1YQ73WzP13I0NNPwX5dIBNRYbPkB5AZ2NX3r2rQJFZxQRBzVvRigjw 94cP3Y9asSwhg== 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/7] Docs/admin-guide/mm/damon/usage: fix typos in references and commas Date: Fri, 16 Jun 2023 19:17:38 +0000 Message-Id: <20230616191742.87531-4-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230616191742.87531-1-sj@kernel.org> References: <20230616191742.87531-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 506BE40010 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: nmdj6ymrgbn39qtsa8msku9ajyqt98ac X-HE-Tag: 1686943071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OQeIsi4EfUoPe6rBbdvzBWDSE50U0zo640/9DIQOTvplKCfTcU/v9q/0OSvpia36R/Xh8vT0qxrwQJRzAIygkLcnL9QKrUgR2m7Zxw09+yYj6qLezXR1uG7lg11OqZmXsqQmLYR/LiqVm0eVaQp3Fj2YjcMsr1+lBPdpXch+dLdD6JqqfxX6im2ra0kuzW2jTyBdi3pP5P1Rbn8yT2JLaTCjjvxtYxflsoi+zJCcHGTUfZSNlxTBn+xZSu0jZ4XVkz7YW97XiyIZ1IcDg0JQSXQ4Jf1N1dLthNubjz+2Ubzcg8GCrsZRGNc1JA== 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: Fix typos including a unnecessary comma and incomplete ':ref:' keywords. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 9b823fec974d..d2435dcc22f4 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -139,7 +139,7 @@ scheme of the kdamond. 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 `. +:ref:`tried_regions section `. If the state is ``on``, reading ``pid`` shows the pid of the kdamond thread. @@ -282,7 +282,7 @@ memory regions having specific access pattern of the interest. The keywords that can be written to and read from the file and their meaning are as below. Note that support of each action depends on the running DAMON operations set -`implementation `. +:ref:`implementation `. - ``willneed``: Call ``madvise()`` for the region with ``MADV_WILLNEED``. Supported by ``vaddr`` and ``fvaddr`` operations set. @@ -432,8 +432,7 @@ starting from ``0`` under this directory. Each directory contains files exposing detailed information about each of the memory region that the corresponding scheme's ``action`` has tried to be applied under this directory, during next :ref:`aggregation interval `. The -information includes address range, ``nr_accesses``, , and ``age`` of the -region. +information includes address range, ``nr_accesses``, and ``age`` of the region. The directories will be removed when another special keyword, ``clear_schemes_tried_regions``, is written to the relevant From patchwork Fri Jun 16 19:17:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13283223 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 D8667EB64DB for ; Fri, 16 Jun 2023 19:17:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8096B8E0003; Fri, 16 Jun 2023 15:17:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 791026B007B; Fri, 16 Jun 2023 15:17:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 658C48E0003; Fri, 16 Jun 2023 15:17:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 53B806B0078 for ; Fri, 16 Jun 2023 15:17:54 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 16AA61A0D6B for ; Fri, 16 Jun 2023 19:17:54 +0000 (UTC) X-FDA: 80909570868.16.F444A5A Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf02.hostedemail.com (Postfix) with ESMTP id 4607E8001D for ; Fri, 16 Jun 2023 19:17:52 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NxTPy+3O; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf02.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=1686943072; 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=Knb0u40VPK5BdCzp17+/prwS89Iq9Df6vo8ZVn7BpOE=; b=t0AB0HC7yyezWNYuvwUoDU31q/3x7O1ZnzVWDg6X1P9NTnvtmusldkegy0+sF2xl5uWmkg 2in08dlup2mEhxRcvQwSv/MUCtwiaftP0p9Jf3JRklOqgJoS9vTnEazdjEaFewGMrGiqDS y3kw9LUjmwLIqWq71W5sA4XLRFaBIJI= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NxTPy+3O; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf02.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=1686943072; a=rsa-sha256; cv=none; b=oT6or7BihTQFEE4x+XJHNQltZHeJIoYzJIpLKJbyK1DVI5lj3KyX6e1Z16ektFsn6NdKH1 ZMqTnwcQp7W+4JNWmK1K1l0U/kzyPQIOPk6TCvCam6qX37vnR3i7mfR78LmOI8iPciUcWB EXqu4gZlA5y28XMiywcvjbaKrKEEKoc= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7E8DF63D9D; Fri, 16 Jun 2023 19:17:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C470C433C9; Fri, 16 Jun 2023 19:17:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686943070; bh=aJtinuQE5hnsMJprwvOnjBhsLDj5P+RjjV73H7HUq2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NxTPy+3OTB1zZ2p0KOifG1NKvCKG0RPDaSG85QRPUoigBNHlTUZu4IbuDIX1BN/r6 0+nWVeeA4PP8KxacmnmdoMm28huF1hDRuC3xDPquhxJ9hgJhhpngED2RmZ6zH6kEyu vOm2l99AeV0gY6VxJKIc+q6c86nnHp8VLuRBybH05MJ14lf4M3Ud0Tplt+AhqMnPhH W71TKq1CqbVD8hCBBNAwHmx02Yp1kwjtV/BEnhE2hT4VQM2Wr+OsPXz5lUtKzPkY+A xFXbHLwoDdVbARv4s+MCH8i6Ft0nXc8fQ5morIYwX0LYBsCcf98vRU6AC9zqngPjCv nzMOLdQ3vE3iQ== 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/7] Docs/admin-guide/mm/damon/usage: remove unnecessary sentences about supported address spaces Date: Fri, 16 Jun 2023 19:17:39 +0000 Message-Id: <20230616191742.87531-5-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230616191742.87531-1-sj@kernel.org> References: <20230616191742.87531-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 4607E8001D X-Stat-Signature: 4bn3h7dg73ua9qwbr3kihysjgkf3p68c X-Rspam-User: X-HE-Tag: 1686943072-898480 X-HE-Meta: U2FsdGVkX1/V6AdpA2abmO80tFVIX/ogvDBELodfgk2qH40M385ohmy4qTy7ucCyXFxHNDdYIwtsqlOLsMDCccljlw0ZSjomY6zweJy8udl2hg0iCheeh5Rw7Qul+oy8/p5yd1JH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h5FpbSvN5i3waSgim1+fFbmNKtV2mupA7GnKgISzc4/wAKqNYCEsnULSBPvHzI7QW2aXQtZEKbBvKaJIYdCwQw3/RzDENJ5UtlOWdLlHp14Jo1m5xOaBLFv5QcVs4lHKfI= 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: Brief explanation of DAMON user space tool and sysfs interface are unnecessarily and repeatedly mentioning the list of address spaces that DAMON is supporting. Remove those. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index d2435dcc22f4..82a79838a47d 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -10,9 +10,8 @@ DAMON provides below interfaces for different users. `This `_ is for privileged people such as system administrators who want a just-working human-friendly interface. Using this, users can use the DAMON’s major features in a human-friendly way. - It may not be highly tuned for special cases, though. It supports both - virtual and physical address spaces monitoring. For more detail, please - refer to its `usage document + It may not be highly tuned for special cases, though. For more detail, + please refer to its `usage document `_. - *sysfs interface.* :ref:`This ` is for privileged user space programmers who @@ -20,10 +19,9 @@ DAMON provides below interfaces for different users. features by reading from and writing to special sysfs files. Therefore, you can write and use your personalized DAMON sysfs wrapper programs that reads/writes the sysfs files instead of you. The `DAMON user space tool - `_ is one example of such programs. It - supports both virtual and physical address spaces monitoring. Note that this - interface provides only simple :ref:`statistics ` for the - monitoring results. For detailed monitoring results, DAMON provides a + `_ is one example of such programs. Note + that this interface provides only simple :ref:`statistics ` for + the monitoring results. For detailed monitoring results, DAMON provides a :ref:`tracepoint `. - *debugfs interface. (DEPRECATED!)* :ref:`This ` is almost identical to :ref:`sysfs interface From patchwork Fri Jun 16 19:17:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13283224 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 BB5D0EB64D7 for ; Fri, 16 Jun 2023 19:18:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7939E8E0005; Fri, 16 Jun 2023 15:17:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6821C6B007B; Fri, 16 Jun 2023 15:17:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D1A98E0005; Fri, 16 Jun 2023 15:17:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 3B5756B0078 for ; Fri, 16 Jun 2023 15:17:55 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 1548A120DA4 for ; Fri, 16 Jun 2023 19:17:55 +0000 (UTC) X-FDA: 80909570910.08.00D1D86 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf11.hostedemail.com (Postfix) with ESMTP id 3D62340024 for ; Fri, 16 Jun 2023 19:17:52 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="paP/cMrr"; spf=pass (imf11.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=1686943073; 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=95UoFLgZ6SxoqX8pXjdKD3hamOYJi8AF32Yw0fsYzB8=; b=Yl355iZNH5CC9h9NlO+wI2v/Dj9zfvxi0YMsrSA+kQZaTYePJU1A37YOy2Bt0d4wQX8sce byyKyszE13+PZJ5yymwVof8hPuKyNt5odMMMPMrhJ2adzNwJh19TaJ+7j0OkMxB8ygtjSQ sHfLUe6ewWZsXkxw5Mbm/eFxRcQMLO4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686943073; a=rsa-sha256; cv=none; b=5k7pbGI2RhK6S8wS6+AQHufjKTSxA/2aYjExleLyT5hfs2ER3UHnlXwAftEzy9izK8ofLw QWBIWqPGCl+DyYAtshAM1XJazC03QpiQU8/ji82ey1LVOC4OoZt/9vX745R5nkE9RN1IqB kIwg75WOJzzP1+1xpgHSMMBYZMn6gQQ= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="paP/cMrr"; spf=pass (imf11.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 (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4551563CEC; Fri, 16 Jun 2023 19:17:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27FFEC433CB; Fri, 16 Jun 2023 19:17:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686943071; bh=f3HOe9/kZR2u+JAC7ZFka5WaxvMhj+FaHkWQpsoLpnE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=paP/cMrrN2YC1qI+2IOL6lzfXW+Cgu9GTDAFTYdWea8Vi9SeJGajGut/HE8gpTI1G YPSdaHIqP/xEAjnvjXDzgDU7D82IMUJGXx8HhmVYuSXRfm7bP3Ec1KgfFqvXSgR1QJ NNMxIA79qpBl4DsDGX6d0dF5bWvxj+IjySwODmHLwaJTKDIOY4j/QV2/4SSNyUGrii 0FxdXjaDU/4yVD2D8dQ8cy8Lvw0xpXDuDSlxj4MUFEzG+fcnEI5J2GsaueAGO24eRA SlZ4VI+1u4Dfkw+hjNHxjGUfSwNalwcnN6/BsiETA6RsnAPLVcYAoGp0kKpCY69N7J c3HDybrTKMGmA== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Jonathan Corbet , damon@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] Docs/admin-guide/mm/damon/usage: link design document for DAMOS Date: Fri, 16 Jun 2023 19:17:40 +0000 Message-Id: <20230616191742.87531-6-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230616191742.87531-1-sj@kernel.org> References: <20230616191742.87531-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 3D62340024 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: mxm8qgqn6dyrm9fe9qps9jgdh6zhkyax X-HE-Tag: 1686943072-843963 X-HE-Meta: U2FsdGVkX19577MfO8kRu4vJhtnzA08Ero0JNDHOF/6zH1+aiLahhqPjns3Pek0TKbjcUnEQZj3+3zVpCGje9U9hiNlGG8Kpv8D8vDuZaJr8V/nRVeZ7dZiNvrE9z2mgiNCUG1r5e0618TKh4EtXKqP5PqZjIQTGCgGBSf5Q7UH5EaZgYcJdrh7jv/LuRrAwKMMNYkgRzlTBi1pL6/QlT++SrKtgpDqmhEpiMr/dLXjnGL2J/9Lc1zN0/AA8nAKPgSSggTGOl9wSHHmquIvqFd71TRh3CihAozSF7r2LWY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ender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The background and concept of DAMOS is redundantly documented, in the design document and the usage document. Replace the duplicated ones in usage document with links to the design document. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 104 +++++++------------ Documentation/mm/damon/design.rst | 14 +++ 2 files changed, 51 insertions(+), 67 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 82a79838a47d..ea6a5dc8930e 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -257,12 +257,9 @@ be equal or smaller than ``start`` of directory ``N+1``. contexts//schemes/ --------------------- -For usual DAMON-based data access aware memory management optimizations, users -would normally want the system to apply a memory management action to a memory -region of a specific access pattern. DAMON receives such formalized operation -schemes from the user and applies those to the target memory regions. Users -can get and set the schemes by reading from and writing to files under this -directory. +The directory for DAMON-based Operation Schemes (:ref:`DAMOS +`). Users can get and set the schemes by reading from and +writing to files under this directory. 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`` @@ -275,9 +272,9 @@ In each scheme directory, five directories (``access_pattern``, ``quotas``, ``watermarks``, ``filters``, ``stats``, and ``tried_regions``) and one file (``action``) exist. -The ``action`` file is for setting and getting what action you want to apply to -memory regions having specific access pattern of the interest. The keywords -that can be written to and read from the file and their meaning are as below. +The ``action`` file is for setting and getting the scheme's :ref:`action +`. The keywords that can be written to and read +from the file and their meaning are as below. Note that support of each action depends on the running DAMON operations set :ref:`implementation `. @@ -302,10 +299,8 @@ Note that support of each action depends on the running DAMON operations set schemes//access_pattern/ --------------------------- -The target access pattern of each DAMON-based operation scheme is constructed -with three ranges including the size of the region in bytes, number of -monitored accesses per aggregate interval, and number of aggregated intervals -for the age of the region. +The directory for the target access :ref:`pattern +` of the given DAMON-based operation scheme. Under the ``access_pattern`` directory, three directories (``sz``, ``nr_accesses``, and ``age``) each having two files (``min`` and ``max``) @@ -316,18 +311,8 @@ to and reading from the ``min`` and ``max`` files under ``sz``, schemes//quotas/ ------------------- -Optimal ``target access pattern`` for each ``action`` is workload dependent, so -not easy to find. Worse yet, setting a scheme of some action too aggressive -can cause severe overhead. To avoid such overhead, users can limit time and -size quota for each scheme. In detail, users can ask DAMON to try to use only -up to specific time (``time quota``) for applying the action, and to apply the -action to only up to specific amount (``size quota``) of memory regions having -the target access pattern within a given time interval (``reset interval``). - -When the quota limit is expected to be exceeded, DAMON prioritizes found memory -regions of the ``target access pattern`` based on their size, access frequency, -and age. For personalized prioritization, users can set the weights for the -three properties. +The directory for the :ref:`quotas ` of the given +DAMON-based operation scheme. Under ``quotas`` directory, three files (``ms``, ``bytes``, ``reset_interval_ms``) and one directory (``weights``) having three files @@ -335,23 +320,20 @@ Under ``quotas`` directory, three files (``ms``, ``bytes``, You can set the ``time quota`` in milliseconds, ``size quota`` in bytes, and ``reset interval`` in milliseconds by writing the values to the three files, -respectively. You can also set the prioritization weights for size, access -frequency, and age in per-thousand unit by writing the values to the three -files under the ``weights`` directory. +respectively. You can also set the :ref:`prioritization weights +` for size, access frequency, and age +in per-thousand unit by writing the values to the three files under the +``weights`` directory. schemes//watermarks/ ----------------------- -To allow easy activation and deactivation of each scheme based on system -status, DAMON provides a feature called watermarks. The feature receives five -values called ``metric``, ``interval``, ``high``, ``mid``, and ``low``. The -``metric`` is the system metric such as free memory ratio that can be measured. -If the metric value of the system is higher than the value in ``high`` or lower -than ``low`` at the memoent, the scheme is deactivated. If the value is lower -than ``mid``, the scheme is activated. +The directory for the :ref:`watermarks ` of the +given DAMON-based operation scheme. Under the watermarks directory, five files (``metric``, ``interval_us``, -``high``, ``mid``, and ``low``) for setting each value exist. You can set and +``high``, ``mid``, and ``low``) for setting the metric, the time interval +between check of the metric, and the three watermarks exist. You can set and get the five values by writing to the files, respectively. Keywords and meanings of those that can be written to the ``metric`` file are @@ -365,12 +347,8 @@ The ``interval`` should written in microseconds unit. schemes//filters/ -------------------- -Users could know something more than the kernel for specific types of memory. -In the case, users could do their own management for the memory and hence -doesn't want DAMOS bothers that. Users could limit DAMOS by setting the access -pattern of the scheme and/or the monitoring regions for the purpose, but that -can be inefficient in some cases. In such cases, users could set non-access -pattern driven filters using files in this directory. +The directory for the :ref:`filters ` of the given +DAMON-based operation scheme. In the beginning, this directory has only one file, ``nr_filters``. Writing a number (``N``) to the file creates the number of child directories named ``0`` @@ -597,15 +575,10 @@ update. Schemes ------- -For usual DAMON-based data access aware memory management optimizations, users -would simply want the system to apply a memory management action to a memory -region of a specific access pattern. DAMON receives such formalized operation -schemes from the user and applies those to the target processes. - -Users can get and set the schemes by reading from and writing to ``schemes`` -debugfs file. Reading the file also shows the statistics of each scheme. To -the file, each of the schemes should be represented in each line in below -form:: +Users can get and set the DAMON-based operation :ref:`schemes +` by reading from and writing to ``schemes`` debugfs file. +Reading the file also shows the statistics of each scheme. To the file, each +of the schemes should be represented in each line in below form:: @@ -614,8 +587,9 @@ You can disable schemes by simply writing an empty string to the file. Target Access Pattern ~~~~~~~~~~~~~~~~~~~~~ -The ```` is constructed with three ranges in below -form:: +The target access :ref:`pattern ` of the +scheme. The ```` is constructed with three ranges in +below form:: min-size max-size min-acc max-acc min-age max-age @@ -628,9 +602,9 @@ closed interval. Action ~~~~~~ -The ```` is a predefined integer for memory management actions, which -DAMON will apply to the regions having the target access pattern. The -supported numbers and their meanings are as below. +The ```` is a predefined integer for memory management :ref:`actions +`. The supported numbers and their meanings are as +below. - 0: Call ``madvise()`` for the region with ``MADV_WILLNEED``. Ignored if ``target`` is ``paddr``. @@ -646,10 +620,8 @@ supported numbers and their meanings are as below. Quota ~~~~~ -Optimal ``target access pattern`` for each ``action`` is workload dependent, so -not easy to find. Worse yet, setting a scheme of some action too aggressive -can cause severe overhead. To avoid such overhead, users can limit time and -size quota for the scheme via the ```` in below form:: +Users can set the :ref:`quotas ` of the given scheme +via the ```` in below form:: @@ -659,19 +631,17 @@ the action to memory regions of the ``target access pattern`` within the ```` bytes of memory regions within the ````. Setting both ```` and ```` zero disables the quota limits. -When the quota limit is expected to be exceeded, DAMON prioritizes found memory -regions of the ``target access pattern`` based on their size, access frequency, -and age. For personalized prioritization, users can set the weights for the -three properties in ```` in below form:: +For the :ref:`prioritization `, users +can set the weights for the three properties in ```` in below +form:: Watermarks ~~~~~~~~~~ -Some schemes would need to run based on current value of the system's specific -metrics like free memory ratio. For such cases, users can specify watermarks -for the condition.:: +Users can specify :ref:`watermarks ` of the +given scheme via ```` in below form:: diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index a98af99bb705..4bfdf1d30c4a 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -218,6 +218,8 @@ abstracted monitoring target memory area only for each of a user-specified time interval (``update interval``). +.. _damon_design_damos: + Operation Schemes ----------------- @@ -255,6 +257,8 @@ the access pattern of interest, and applies the user-desired operation actions to the regions as soon as found. +.. _damon_design_damos_action: + Operation Action ~~~~~~~~~~~~~~~~ @@ -277,6 +281,8 @@ characteristics. Hence, DAMOS resets the age of regions when an action is applied to those. +.. _damon_design_damos_access_pattern: + Target Access Pattern ~~~~~~~~~~~~~~~~~~~~~ @@ -288,6 +294,8 @@ region's three properties are in the ranges, DAMOS classifies it as one of the regions that the scheme is having an interest in. +.. _damon_design_damos_quotas: + Quotas ~~~~~~ @@ -305,6 +313,8 @@ 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. +.. _damon_design_damos_quotas_prioritization: + Prioritization ^^^^^^^^^^^^^^ @@ -330,6 +340,8 @@ the weight will be respected are up to the underlying prioritization mechanism implementation. +.. _damon_design_damos_watermarks: + Watermarks ~~~~~~~~~~ @@ -350,6 +362,8 @@ is also deactivated. In this case, the DAMON worker thread only periodically checks the watermarks and therefore incurs nearly zero overhead. +.. _damon_design_damos_filters: + Filters ~~~~~~~ From patchwork Fri Jun 16 19:17:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13283225 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 9BC38EB64DB for ; Fri, 16 Jun 2023 19:18:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 018EF8E0006; Fri, 16 Jun 2023 15:17:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F0B126B007B; Fri, 16 Jun 2023 15:17:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DD2588E0006; Fri, 16 Jun 2023 15:17:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id CE8A66B0078 for ; Fri, 16 Jun 2023 15:17:55 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id A878BA05BE for ; Fri, 16 Jun 2023 19:17:55 +0000 (UTC) X-FDA: 80909570910.01.8C42E78 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf30.hostedemail.com (Postfix) with ESMTP id EECF88001A for ; Fri, 16 Jun 2023 19:17:53 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=dub7L+lm; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf30.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=1686943074; 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=ZM0ZnXnsrPvucLQME3U9IVkJRNmDqDEteq7kkg4MoFg=; b=dLCo1Vno7gfdQQb4BUlbf8MahSiX8pGAOof666EHZY6j5C0GCtCr4d/bSqzQG4jfiuq9zs CERBkTypgfPRi8X6uJdJZSDX1R75eA7Xf3NNkQpOWpv6RvdV2YQ1Xz9lY5fBeVVYFwQ523 98uwxOCH8ogu+TTEuylkEcmccmExFZU= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=dub7L+lm; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf30.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=1686943074; a=rsa-sha256; cv=none; b=lXIaOThC4cn88SaJTpcUXH0/axpHWd89f0e0gKSVkEEBISksvtBvdBtwzesNsX/FyfXB7d M4UuKyGgr1RFAjZXtCZzJqUrZufXCaMrmhyBbiM7S+vDj3Pw4L/fM1PsG0/N0fDwk8MrYm OaAhgUarYF3WKo6pVlR70KMBDdmVMxw= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3BD5363F01; Fri, 16 Jun 2023 19:17:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5EFFC433CC; Fri, 16 Jun 2023 19:17:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686943072; bh=NSJWB8qz10yOL/bHuEJZ9E4zJc8xME6g7oYO5L7FpU4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dub7L+lmxmLwpcJQU7FPIsUOXY6YxCJpUw2WsTuGV7MavLJn4qkm4yw+R3detHRCK wZRKPnZJnsWLDYuxH6d97h19JH1JwPJ3CtrXoSXXWyw7u6uxJv0ECzr16ZoR2UzVeH /SaDSjdZ0vqJ9X/5qIfwnMfMIMitlz00Z+tEXJug8BtHbd+fyVa31ymIyHzXwR16Y1 iPy0fjKfKdIcSv3RyrdGCi6Z6pOH+YvyKxAsLC813yl3if9Ea5jxwDf0IttXWLnUut r/KTj/2WW4U/PPHkMn5vGfjtAZT+0i7AWWIS1LXf9XEfsZCUSyxjAgf7g5VWe3HrEQ E2zBFdu3iIPLw== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Jonathan Corbet , damon@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] Docs/admin-guide/mm/damon/usage: clarify quotas and watermarks sysfs interface Date: Fri, 16 Jun 2023 19:17:41 +0000 Message-Id: <20230616191742.87531-7-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230616191742.87531-1-sj@kernel.org> References: <20230616191742.87531-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: EECF88001A X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: zud5x7zrydhfjme8tzu34xwd3w7u754j X-HE-Tag: 1686943073-485647 X-HE-Meta: U2FsdGVkX181Wf98DJ6fSwLpUYS55K7GeAdpvhwGTs/wlN2JZ3DncdVBl/7g333LNAO97s7K1eeKpfZP88A0abYtVJfZ+46S4zjJqovV8assGhGcZFIfKuX77X5SIzku0afmpwPs2co3OhgspoKQWcT/YyVqGxgjO/oydyv/v83r59IqLULSxh0yG9xFrZJvqaJhUq1omaXoF0gBZAwXfk3YZL3Xsi7p353m9nmcZ0ZmZWBdRxythj5U/m5++zUNZPrOhUNoIRyCXwjuop2lmwIfxaqZUSftU3IhoizJoYAj5fGxtA9KwewrwVyHooYcaqLLfm5+VTX5u0Zy8l435vbr0wSVK0jE6icBPV1crePNvECXtEQafzgwbaI83r06aCYPpi/SFLHHGDwG0nJJszrg3dbheILRqLaOao6HZNkI5J1Z/BSkp+0hVjbJ6UdRRoeYs1L/dJx7NwstnU9bzb72ZR7zBiqars+YecKPy9rV1t2b2DvSelTDf6ESPFBZsAjvBPdLu6a3HScxPt/VFeGavE5I0dfbbeEjz9Fu5H8uLUz39yS60bGvfeTrBmUfIdTLPr+CpKz30FLHOM/oB3d5r/ngyUTPQfnLIuGeo4Wsx+1ruIZcPrLlaapC+otzJH4KUTWc0Xyy01aAX27n7J46gXuUtx+tBURtDCxJnuMc+lV/gVcR2uCJOsfDfIvINC4ppeYzZHaHv1SGoAyYZFqMFGuMSW+oq6S9rodoAOhcEHw67yLbdrIcI/8hU6DIi63quBmxBrsf3QjjdAx37ozIGSvNrRfg7uZ6KRzV1ZIRKgimEsM7xhHQE0fiOEbswc0GAiVv3Db42JfXKYkvJq4HioLap6UmI3xY7IAtsVgB621IORVqHIPLPiAiCHN97NoTT7g2EanNIW98NNRD4a172JrZ5BgI+kpvpoP/74tNbWdD9j0pq0yGbNH5Ut4cwvVug0Z5nxRmKb++7Lo 21KveNuf YZbDXTKQ3PsxRxsk1ZE7JHLcql/zKs3w6Nh0ueFxZ86/Yi8uWeb/VyCUDuUxUL4zWUOfgrVFjYNLqxDLAP3NWIcQ0K5mwXRhevbU00wBTNrjp6T4DBQo2WVYw9joxyRZawmVu4mgk8ivtMnvTlEWwr//gDEceB27cMkZezArUaeGnukO37omyrtJK9FcTqpjAK2jLaeEmEnC5fagyp660o+XIfN3sMxn04Re8NuH4WGIYcYSFJbFf6Gq2GIEt9fHYE8iDKZP9lMTKtvY+ryZWLrukBkGr+q0iLxArIxJe6KNdT+dNA+kyCr1TldrcyfxXrMl+IpQ3/EBjN+xfGwaw1bjszw== 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: Explanation of DAMOS quotas and watermarks are not clearly explaining the meaning and expectation of each file. Add more clarification for those. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index ea6a5dc8930e..9d3ebd70772f 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -306,7 +306,8 @@ Under the ``access_pattern`` directory, three directories (``sz``, ``nr_accesses``, and ``age``) each having two files (``min`` and ``max``) exist. You can set and get the access pattern for the given scheme by writing to and reading from the ``min`` and ``max`` files under ``sz``, -``nr_accesses``, and ``age`` directories, respectively. +``nr_accesses``, and ``age`` directories, respectively. Note that the ``min`` +and the ``max`` form a closed interval. schemes//quotas/ ------------------- @@ -320,7 +321,13 @@ Under ``quotas`` directory, three files (``ms``, ``bytes``, You can set the ``time quota`` in milliseconds, ``size quota`` in bytes, and ``reset interval`` in milliseconds by writing the values to the three files, -respectively. You can also set the :ref:`prioritization weights +respectively. Then, DAMON tries to use only up to ``time quota`` milliseconds +for applying the ``action`` to memory regions of the ``access_pattern``, and to +apply the action to only up to ``bytes`` bytes of memory regions within the +``reset_interval_ms``. Setting both ``ms`` and ``bytes`` zero disables the +quota limits. + +You can also set the :ref:`prioritization weights ` for size, access frequency, and age in per-thousand unit by writing the values to the three files under the ``weights`` directory. From patchwork Fri Jun 16 19:17:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13283226 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 74330EB64D7 for ; Fri, 16 Jun 2023 19:18:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 43D4E6B0078; Fri, 16 Jun 2023 15:17:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3E6878E0007; Fri, 16 Jun 2023 15:17:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 275146B0078; Fri, 16 Jun 2023 15:17:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 133678E0007 for ; Fri, 16 Jun 2023 15:17:56 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id C889B1A0CCB for ; Fri, 16 Jun 2023 19:17:55 +0000 (UTC) X-FDA: 80909570910.29.7FE642D Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf05.hostedemail.com (Postfix) with ESMTP id 24E9E100015 for ; Fri, 16 Jun 2023 19:17:53 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=fdKFp883; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf05.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=1686943074; 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=+mSq/4AWy/4TnT9T1nriQ/s6vOHvvzPNwXTrEuXGx5I=; b=XR0ttgEQ7lyqSjQCXcN8DI/9OTlMn+dwFH839ybpA2t7y57YQncEO5yTiM3wUlMcOPVGTi NBLOzsgoRzfldRmyN3/9BbPUbdCgm2Gy8sbFYX+IcOe78BOPyQCJ8Xl6fiRPVDzgImjNdh CTS23UdLimMunh6LDfDYi0dAaAzkHoQ= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=fdKFp883; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf05.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=1686943074; a=rsa-sha256; cv=none; b=CujT77lvrhWNE/4Q/ZkCFZ+VoVbjyR0AeSVAYvNq5CUbRlbVWzaXDlBt9fI3GI5rcO7h+I CmFXtlx3VAN6y/8oCVOM0dwEMDkRjb9PsHsw5InmbDjijPiQeqED2F7i9E7qKVecpZrIOy Ayi3d1Lz4Kwnxz5kU6jmYyUWBp9l+t0= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5572963F10; Fri, 16 Jun 2023 19:17:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A20C1C433C0; Fri, 16 Jun 2023 19:17:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686943073; bh=wbuN7e/qxUK5fsj+ITNoDIFCanTeV9WF0LmR4CSecxI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fdKFp883AX88acKBHDx48kRiVvHf4vAnGts4dIlATFRaFiA+jw/b7JTmej8wv2nhF HNbZZS3cQgg3JeifwfCRmjCkyLbNgHokw7l14YBc1W2QjC0dhcZgUIKcKWwfXFcLvH 69ycl4hpVUSjoQDMDElEryIHjZISCmTUvke0cJVNE+ywuLfC5iH++zJ47DoSvBw4VQ 16Ur5CKlNnFjr9iJrW5tItSl+nLXpCJORhNcfdX40xdf5Yl7dIHLMsJMm3pvtc7qQB kMK9J6K5Q7hD8z9RqnEbNYU7Y5q7LdpgIuLtJrmQ5SZEHD+yumUVhge1LlUB9anGxN GW22IDZWslXvQ== 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/7] Docs/admin-guide/mm/damon/usage: update the ways for getting monitoring results Date: Fri, 16 Jun 2023 19:17:42 +0000 Message-Id: <20230616191742.87531-8-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230616191742.87531-1-sj@kernel.org> References: <20230616191742.87531-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 24E9E100015 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: g9my4b4ue7qe4amr5gwsphnmq11m4b1n X-HE-Tag: 1686943073-256170 X-HE-Meta: U2FsdGVkX18L76B4yFaPR55P61+YWg+JqACugGT1JkyI96hyMBEiJb4wO4a1xb2g2WMoiX1aOcN8QzF3/MOIdNhdIMrtG/BuZth0Bb7ERGvlhztsPfpFoQo/d5c9jvG9k01iP9+KS5ojJkbDYO4/Ztxmr8m/JuGF3ZwB7J/Jy6RetYdu0Uihtq6xZzLYWZA0uIy7Jw6hXLBomPcks45MaCbdkDeiRRJ6eURWxP55J9oTeDNZdIo61nmuNSyRNa8N3LKMXXMQSJSbBJkFz6h/8XPI8yqyyQCXky/3rXYaGIbnHgJN/faAINJqPPYFeWqrj0lvNxIEdVV1sQv/divDMJ+Wh0M/tgprHmx5pP/peIe2A2C4Cc6ZkIcD2lgLyjqdkruLpYTngO7Heu4X8KNhQi42kG+t9t4j1DXJ2QGByQU28iWp6KtRKYxoFKWeJnJNtjrBlrNvID2o88nL0EcEwkuy9mcFmICOMDSlXFxYhEDWuzygqKJFDKeiIPNncdY29f4CCUea6MvCSFtaLWovIAyV1YhOA8roH+XnHfila/0PqtX6yIZuFT49+4rPPXtm+HblFFMcLKiQbT7zD0DOlqqXp2uC904RV73LaJT7870ZHlp32EpfYLnxWysu0rSGus7LesbL088w/AL8idzbI7hPQ8ZgLKn6vSCBS3aneABUg/7CHkELS+vNTnogNWhoB2MT0H1Jc8Z7NOS/LXmPbshjOjCYumwD+91aHlAqcI8WtRyLLtYugQ07URkBQcHPdX2SM0dYiYwZwxFaQxt3auxykppZZlXGBY2obEWkfW2WZkDbbedFRkmOiujCTIDp5+llpAxSZ/otZhK/VkKreBEwzV7BSh3qL5bm/ARu6PKN/J1Vlw56wHSGW9/Ex/d1ko18zJMGZtj1/Ib1hYkXP2jYh2ix/K3RqjWcDVoKomJxChpBGXM04zCmCPYuD/6veYO+00p80/1RI4aANLa Zm9TJIho 6mwvz6HCPaWFgPvCccLLqhHlh0hfWoYhE31EuXyONn7RMbOVdXXZDMxPaDCSUg3bAM9fmRMwjSk18raUXBt8eAC6IPvPaU42esbqKk1EyUZcDIsHFL3OYOkvBPbYmO8VqBFBCXIimNg+k3NYPI/j0shPnDuDQzjtBNxf2k0iGn3qKZM+zlGkwCbsOqH2FOm8i8sVYiDDoI8G4a6vqZqIP0E1/zGrHc5p6KceEY06C2OVnpnB1G6j0TSdSnZS+F6ALiYnkqbts27rL1zytWwcHog230Sg/uor7WEtjKdQXIWiS+geJBGidg6Ti3WXJ9oGgjV6Nw5aDUokUm8TkFsoNWzhXqN+QUb1oRcyAgjRfRtbtECI= 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: The recommended ways for getting DAMON monitoring results are using tried_regions sysfs directory for partial snapshot of the results, and DAMON tracepoint for full record of the results. However, the tried_regions sysfs directory usage has not sufficiently updated on some sections of the DAMON usage document. Update those. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 9d3ebd70772f..2d495fa85a0e 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -19,10 +19,7 @@ DAMON provides below interfaces for different users. features by reading from and writing to special sysfs files. Therefore, you can write and use your personalized DAMON sysfs wrapper programs that reads/writes the sysfs files instead of you. The `DAMON user space tool - `_ is one example of such programs. Note - that this interface provides only simple :ref:`statistics ` for - the monitoring results. For detailed monitoring results, DAMON provides a - :ref:`tracepoint `. + `_ is one example of such programs. - *debugfs interface. (DEPRECATED!)* :ref:`This ` is almost identical to :ref:`sysfs interface `. This is deprecated, so users should move to the @@ -421,6 +418,11 @@ The directories will be removed when another special keyword, ``clear_schemes_tried_regions``, is written to the relevant ``kdamonds//state`` file. +The expected usage of this directory is investigations of schemes' behaviors, +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. + tried_regions// ------------------ @@ -771,10 +773,12 @@ root directory only. Tracepoint for Monitoring Results ================================= -DAMON provides the monitoring results via a tracepoint, -``damon:damon_aggregated``. While the monitoring is turned on, you could -record the tracepoint events and show results using tracepoint supporting tools -like ``perf``. For example:: +Users can get the monitoring results via the :ref:`tried_regions +` or a tracepoint, ``damon:damon_aggregated``. +While the tried regions directory is useful for getting a snapshot, the +tracepoint is useful for getting a full record of the results. 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 # perf record -e damon:damon_aggregated &