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: 109342 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1571051vqr; Fri, 16 Jun 2023 12:35:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Uz5cZjajn3MgdSrIgapXWvZpyDlnZRyQ/cjEKZmn7Rzy5TjGQCZ11lfvUL8bnS9ktvdGG X-Received: by 2002:a05:6a20:9144:b0:10c:513d:2bd9 with SMTP id x4-20020a056a20914400b0010c513d2bd9mr3142749pzc.50.1686944153621; Fri, 16 Jun 2023 12:35:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686944153; cv=none; d=google.com; s=arc-20160816; b=neyCCDlsw6jhBuf+McgmVQ+wN6CAVfT/p/G3Jpa1adplg8qHo32mKZa7GePMtEnnQW Kf8ElzQj1xfOqr4jU6s55YiyIyE1rq87R+ipO8WFTiN/LdPldZTj3oNXj0uok35bhaHg iFvGzMwo+d8S8z8BNVRPLwJ7IWIG7wzvLK9V76VavaOhYranjtFcWeT+ZeFjgI+X7Sel 8qa83wzZROLEcZDZfc3+VLvJbxhmZ1eYIxASH+iAWaGYV9JNG8cWKGSeX7iij56Q3G5/ TKBp4f5eddb5EoVc8hSuQ5fD40fs+JJTksCzRqFQcAajWjxHg1WLlpEYsHLu+djuT4eT ldyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZOA9Y3WaxSy0wQxXiJlLMJbVdTR4WHvdGzBT7/g3vag=; b=RniRW10Jj41XLLlwZrSLmq+HvFkEiut6MX6zsfKUKdocQHcgfOEyq81NaLUDSWeg5E bWwwDGIN8zBlaF1FZtUGHSh2kFSuynoFBc5bbZkgLEbgMHu4l+45+E8hNDTLoOtiAwjE o8q8qOBF2W8Ac41KAPSlM/zYiJO5aGTvlKhxoeUd6RGugC9ovdFJYfsIVXOCfahfbz/p 7EfF3VVpLk2A9PyED5PViRirirR25tmtN45iTkdc/bpvRVnEZ6zjtu3/1nwk6Ee4V2AN o1igPgWin5jENpbBpbd2t6ze7aL9Apo3HzIhnB//XI169HzUGkwNHB5pfqYFND/q7FZS jcyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qr2d0sNY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv128-20020a632e86000000b0054f93b05b51si9915354pgb.96.2023.06.16.12.35.38; Fri, 16 Jun 2023 12:35:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qr2d0sNY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346124AbjFPTVp (ORCPT + 99 others); Fri, 16 Jun 2023 15:21:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345417AbjFPTVY (ORCPT ); Fri, 16 Jun 2023 15:21:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 515235256; Fri, 16 Jun 2023 12:19:07 -0700 (PDT) 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 5B83E637D2; 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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768889152838458678?= X-GMAIL-MSGID: =?utf-8?q?1768889152838458678?= 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: 109351 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1572447vqr; Fri, 16 Jun 2023 12:39:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ZN1UWKfNnP639PVONqw8ctkQoCldNgJj9IH6HfG6HYJyX1SKes28YzY6BAh4CZTtgPGh7 X-Received: by 2002:a05:6a00:248d:b0:649:450f:3231 with SMTP id c13-20020a056a00248d00b00649450f3231mr3223297pfv.9.1686944343636; Fri, 16 Jun 2023 12:39:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686944343; cv=none; d=google.com; s=arc-20160816; b=nXVbkWxS/PHFFZHeBy3mHG391Lt8+hr+7goKYJ11jNgiNX5z9v1fTcI7xLvb2dB7NB Lqkpu3GM68goFh7O0S0qbHT9QNqf1Os86FMikFw6sfuFylc52jgI6+UTAKIMOn+qw9PF SC4NGfx7lMYJOJw07NLmmTwa8rwNrvTONmM2/Iiu2kXIfv3Vx+4kX5EUYvGLxWKR6ebX xTjhM2g6ybdFuy1cm8NJlYbbL9IuqV8K/O5SN3tctjTU1iWpmkfy9C40+TYX5DSkzu/T 9eMCcQm85Ah6RCw+cGTqOKaXOVlRs7nrl4EGfTCPwUjwdwwalSbH6fQ6+nIeGNrTPu7A Q5zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tDssXFzBfTQBf1iQwsSfccJcdCXTNZxoUGwyfZL6uNc=; b=oaWbi95tpyHdJxXi0QqeBnS5cF/F/EwUAok3SFbp4iBksxV1beLt18Cs/XvAA5U8Kb CjmsKhOnmSZqTXpqvLrE4BoeFtTMiQm0jBBapo8aamugPKPii7gaTw3Tr2Ey7/v/pKPQ zdtcDilWkBNHMmknU8/0aWjM5p+ii2YFi52KI/KzcfU9qgN8w9YvXwehot5Cxu9xg/Fd faTVJ37KoUgy+/A/F7ssSkwL3Ek8ujoqv5gYJHqGZUcIcZhLjmi+oo0xzm5Xy7kd760V +X6czM48E/m9pX2YZNQ1X6OxWJUMzi1flGIA+xX79dNJtA3cMIrVL0KxZOdca6c+82Wk 9DrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pjRyPXBj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y205-20020a6264d6000000b00666ebb65809si579102pfb.15.2023.06.16.12.38.50; Fri, 16 Jun 2023 12:39:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pjRyPXBj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345417AbjFPTVx (ORCPT + 99 others); Fri, 16 Jun 2023 15:21:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345460AbjFPTVY (ORCPT ); Fri, 16 Jun 2023 15:21:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 882C7525C; Fri, 16 Jun 2023 12:19:09 -0700 (PDT) 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 17DCE63E91; 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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768889352211389329?= X-GMAIL-MSGID: =?utf-8?q?1768889352211389329?= 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: 109357 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1573736vqr; Fri, 16 Jun 2023 12:42:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5tC36HGytECr1udyNTMxJvyAplr+iOfxqsTWySxtYk8NgdJJeIvKdGlS6L4SdCAT7o35k5 X-Received: by 2002:a17:903:22c4:b0:1b0:5c0a:3f80 with SMTP id y4-20020a17090322c400b001b05c0a3f80mr3630752plg.44.1686944524715; Fri, 16 Jun 2023 12:42:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686944524; cv=none; d=google.com; s=arc-20160816; b=kTIR7HQ1FU1TXxKZWGTqpMmlvuudqFWFYkODb1tFYaPGDqG79mfxz+q+1bmoDMclFZ pa+u153owP0hUsKsuZ9S00oLM/7DiwXM/LSlCgmSIhfLtT3ZVPvInrvaf1v7CTzLZp/O 8Z9/9idrKa586Tj7NiukUMLW5BTYmtDb7TqoVPY7n5lBERG72IsULoDhmSKxEJc+sB2R +mez7LNvXpblG++rvh14oCYybNIq7twtlMtZxZwKHTkgW4PGjWzZXb6SEiXwNqmrv+vR yKJbiI59OePG1hM7pbStfbaRGdPkfi9j8iVew2KUD28VKWGiWBfyqpPt9Is2urgUL1O6 q34A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YVZscyI3LUfRd82qftgm8lyoq62YjymKi21afxT5CmM=; b=Fuxp7PQhkLcwj6K2POGSpZRbNDUFC+YY3USpr8UWl1Hygt/VJTD0kzdR4i6oUqGX3i LU/rpUq3Dk/N0nvfIyEcCCHmjepxY8CC3ftJkzlVfpDOdq0GPUyPI13P+H3eIvVV97pD b95WEtdPH5eQR2KamdCmbIAKxam1xakebbffTu4TpI3Xq+QDUBKiPToiMsE6UkKhFCei eYuuMGlJz9i8ZWQp88VxheQjZJo/NsIPXksCl2z98Z3JyjDV4S9hEiLPBltkYPy/Aepf wqU9oam1ZVq+sKlnxWrYYcQEKOELSQ49zTOH7vIgHSts5fLS+GMbCWkdwTHwqvRgA1gc 9zDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JYrW9cm+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a170902ec8500b001992f451a28si16716952plg.384.2023.06.16.12.41.49; Fri, 16 Jun 2023 12:42:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JYrW9cm+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345804AbjFPTVz (ORCPT + 99 others); Fri, 16 Jun 2023 15:21:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345770AbjFPTVZ (ORCPT ); Fri, 16 Jun 2023 15:21:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD4E6525F; Fri, 16 Jun 2023 12:19:11 -0700 (PDT) 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 C3D4363EB1; 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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768889541598301661?= X-GMAIL-MSGID: =?utf-8?q?1768889541598301661?= 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: 109337 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1570436vqr; Fri, 16 Jun 2023 12:34:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ40uxfQMrvGH7YTtpBqO55WFixued0rHCsP3KAu5XgpT7byWcQ1fCJLpLBJj8J8j+C05DVD X-Received: by 2002:a05:6a20:1446:b0:117:c69b:cb34 with SMTP id a6-20020a056a20144600b00117c69bcb34mr11841299pzi.2.1686944080234; Fri, 16 Jun 2023 12:34:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686944080; cv=none; d=google.com; s=arc-20160816; b=VQYrLMgXP5wZ4mJ2nwM8Uv+VCGWdAhUdNgR2I9VkCs65ovqBANsCH/ic2Mr9XOJFtL d3u7VQzW7azKSAvhILFV3FAElwRhVy2XjaxaFLK1F/eBqZdG1CxT+PXQDLZvbjyCKS4X vbda063lGAdz+2VZRUlpwvFJI9PCWaBNInsDJrdV8d25XcFLOoQbcy419F+GOldgch3t jLKsEOnGQ46BQtFwTm8zVWOj8Hz3giRhK9cg/l+vJeIqLnu3D7ShweFlPUilTSsusU/a /6tDBCRg+XT/q2kLXUTv9tpo9bTL0i1+ReorOQmSiUxEE5SKe0qoH/euiGeO0UbWA5Uc JmjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Knb0u40VPK5BdCzp17+/prwS89Iq9Df6vo8ZVn7BpOE=; b=Tj8WMM+dloX0ed2FfoS0CiDnzWx8UmXVBrJT6TZa1o8T02S9P7y18otwah074WoFBU a4vuLWUiPPg7OXzTusVth87BHYFIQPCP7FfcMk66q+BSt6a8IEjQ/9owrzd4w6okEe0F oM23ndBRECsgKTXywFENiREmReILzewhbZVQV9HhPiA/LkNxWEQAtF000e6RN4kKNMVL N1sFS3ITD6zg6a+sPz1/N4uAc7UXFrpSDpDW+P6kEJ9VeTIRlQPcTBGWbS+Z5/xvPhqc omWw1pEDcbhG1wtIbaYa9D47MormRUlRHunFa4R6pvXC7BoFKLPFy3S3YBnhiogYdz8g FBZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NxTPy+3O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i25-20020a633c59000000b0054ffc2d9fc3si3981814pgn.38.2023.06.16.12.34.26; Fri, 16 Jun 2023 12:34:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NxTPy+3O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346198AbjFPTWy (ORCPT + 99 others); Fri, 16 Jun 2023 15:22:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346134AbjFPTWj (ORCPT ); Fri, 16 Jun 2023 15:22:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16913448F; Fri, 16 Jun 2023 12:20:42 -0700 (PDT) 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 7B84163CB8; 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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768889075671041019?= X-GMAIL-MSGID: =?utf-8?q?1768889075671041019?= 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: 109355 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1572973vqr; Fri, 16 Jun 2023 12:40:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6PjOMc+x3hbzQLUNUHA8IA3tlRgYHKprj3cNjTZLoDW81aEB7gYLLjYbeoI9PLovbkxZio X-Received: by 2002:a05:6a20:160d:b0:111:c8a6:88ca with SMTP id l13-20020a056a20160d00b00111c8a688camr3296590pzj.58.1686944416676; Fri, 16 Jun 2023 12:40:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686944416; cv=none; d=google.com; s=arc-20160816; b=ODLX9cyyaAJlg/GX6/hWVlE4bLP9fOTG4d745wqIwFBicIpkouV9koYykPnh6YKj+5 nnPfKDnwIA960bwwoWajNXVw9v+Q0IoXNKjlcbdnm/eqe9cAfRhufQJdjIKsIPMzn88u DWnOj5d6a6hH3F5Iuph7zYuxdaDpo2ngZhzf3BbuTXytcG4kodMJrdB6yKBYG0K8GIQz 7sJQDXavLhEr0GI8tRzceiQ+iqfLd0T/EF9Xa5alYRwtojEg4vJ4CR1HWmhHCoZSC11f /nA1cbPUL/FRbNiUurhLFNzJ/haQOq3OZ09cv/v4i9vT6g9NZHCke1x/hie42p9gX90e Momg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=95UoFLgZ6SxoqX8pXjdKD3hamOYJi8AF32Yw0fsYzB8=; b=IMZWjYaosjLNa9osZzPnM1t97acLFNsU8Ks4I8E2PTh/XAgQaLpFy506jQkhzfmMAt f25dcLhFmpfKZ+pDPLZmpoaMGVIl9sWjEOHnx6t81ntJME1/sHltHcDQ6bzGN/MtCL1S nSD42ckGbYUnGTSiFhbTJq4ieaYRYLI//9pL/hWjcULLsKcD2ec1e4Rp2olp8C/0BiL0 /7Qfw92WuvI0oD2l9eha1Tmm6CgT2l3tLJAQ0LnwsziVkL4w/9FSjMatNs0tJDqIWGTC BEblsW2noLvKP05xZ/9/Zto4BiojNtgeRZGVC0fFVC3faVb+TggTz5MhA2vVopXYb2uv lIVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="paP/cMrr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y205-20020a6264d6000000b00666ebb65809si579102pfb.15.2023.06.16.12.40.02; Fri, 16 Jun 2023 12:40:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="paP/cMrr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346057AbjFPTXA (ORCPT + 99 others); Fri, 16 Jun 2023 15:23:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229696AbjFPTWo (ORCPT ); Fri, 16 Jun 2023 15:22:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92AA744A3; Fri, 16 Jun 2023 12:20:44 -0700 (PDT) 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 49C8363E4F; 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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768889428415856886?= X-GMAIL-MSGID: =?utf-8?q?1768889428415856886?= 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: 109343 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1571183vqr; Fri, 16 Jun 2023 12:36:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CLTrTchUbTFSXvvwHf93UaIRQQUq+UGYIfyP0xl8IfwvcZtJWFysCmQVci8MtREr2NX2i X-Received: by 2002:a17:902:ea8a:b0:1b2:4042:d227 with SMTP id x10-20020a170902ea8a00b001b24042d227mr2824116plb.12.1686944169944; Fri, 16 Jun 2023 12:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686944169; cv=none; d=google.com; s=arc-20160816; b=U/wjUfuKPWgqD3mEbj3vp6GA6LuWWy5ICT2Chzzz4KmwjxWmeXWG3Y38WBqm7IEMGn pCj2lckGAiBhFZbP7cab09HK/eZM9TNt70x9dZuQwRMY4jsIqajGh1b8xOgJQ9NWjo8U um+KuHawZD0MKT+elx/C6aXK2XujuvBOOMKFKbfUKhcsI+tcMG016oaZJZkzlLwPFJqJ AX+S1Ilo3ovnMcUCyaB3BG9In8xcjFUQ0C5eV4CAxISCPFCdLuJy2D20CVvmt5Yi+2Zm nNjZbDQwVxEdZh3AbAy5U7qIXW9DwiEyW0iXrp/lJo66Yls29yD3xsaBxzJwhBRZC0Ls fVcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZM0ZnXnsrPvucLQME3U9IVkJRNmDqDEteq7kkg4MoFg=; b=XfnSMfSMLQJu+1MSStusJgCdFGQ02oOtd/mf9ipXEzYwjrbs4XjWO6zwdmdJBju8/8 qvnTO4r+dA3GxysJXfHPcWoz9nVI5NLKf8Ib1iE81e3TXvH8NWbmYPuNYkatMlapUxIs OxWZ6Qamluoa/J23wuBG7xGf+qJ77IIxFNl6beHN7Uld0w7gbOJxGVlYnm+kbFj6ZQV7 TrDIZrnkXfMZ5UR7mXu+v/bjhwvDpz4Nieg8C6atFFVkaHEMSny5pg7XqFgmiRbJvFgG DkpSr77gS0h/pwgTkHF6Z183x2+TU77thswatfgYeeHg1L0kzwGnffOi1pcpzGqpFqGw 8Skw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dub7L+lm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k3-20020a170902c40300b001a99ace3e76si12537426plk.554.2023.06.16.12.35.55; Fri, 16 Jun 2023 12:36:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dub7L+lm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345902AbjFPTW4 (ORCPT + 99 others); Fri, 16 Jun 2023 15:22:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346148AbjFPTWk (ORCPT ); Fri, 16 Jun 2023 15:22:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5FEB4492; Fri, 16 Jun 2023 12:20:42 -0700 (PDT) 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 0180C63E6A; 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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768889169930033966?= X-GMAIL-MSGID: =?utf-8?q?1768889169930033966?= 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: 109356 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1573568vqr; Fri, 16 Jun 2023 12:41:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4obN/pq03poFUa9t1TaMYt9VMqTkjOB9x4LY6vUWu7TAGM8CvPk2val26awCyq8Oxomzv1 X-Received: by 2002:a05:6358:e926:b0:12f:2672:6cb7 with SMTP id gk38-20020a056358e92600b0012f26726cb7mr198790rwb.17.1686944500371; Fri, 16 Jun 2023 12:41:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686944500; cv=none; d=google.com; s=arc-20160816; b=QuvWn7c2QOvZK2SD/Au1/1deifoGATJPFtEHN+REnAqut7+teTX5egEBVYesd23BXt 1TUHsAprJK6V+t0BNlBMh/bmVp9HhkZhJrmDPj1zvHCPFOgnSMJ6eroo30Gjc5gNvSau Erg2bA1QyHaP5HbB1stp6DH21DgB0dxtZK1OhNEWhL84ywIRf7l1Aa6D/qdK2M1YUMih L0n/Xh0ezX0lZn1kXQTvoI/nbpiiTcf4BsRE/1ixDX6mnj9ZdBDUqNek5JGOXNVp6N/N ymEUg4g9WFJLGITHDZzc00xITMuIwQnUIKli9cULayRGi//F9tgtxe+/c7+uZc/jvOKA GXWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+mSq/4AWy/4TnT9T1nriQ/s6vOHvvzPNwXTrEuXGx5I=; b=pDFbeDWHN1BB+Yp76x08uYx8upFOTPM4ATsfVtQUzM6DeOPTg+rIiIW0AoWWMqgKYS Clz4yOOwkjmvbigSnVMsZf1KTq6RC4kuTiDbeG8mujDbI+LNotyL5UlMR/RZzUp65Ylg IGBcio274FuyMGaCHm03jmUzo0RbT5V5zIiVj9r5zfBoId7531wAeH6lfD7VfEHUfbRs 7d1/nbBIpV89anVbI5aK9EQFSA7hYh0IS1Is/2rnVN2vKxwnIT+H30Vu+OWCwyfyP2tv W5yOepu/1zToFDECc8s+sF1ZVunecf3pBnLX4x8ssrjMuEw9Ipiw5GoY+g08lZkmiyAs ukXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fdKFp883; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t123-20020a637881000000b0053422305c20si16798699pgc.14.2023.06.16.12.41.25; Fri, 16 Jun 2023 12:41:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fdKFp883; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346239AbjFPTaQ (ORCPT + 99 others); Fri, 16 Jun 2023 15:30:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346343AbjFPT35 (ORCPT ); Fri, 16 Jun 2023 15:29:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FC3F3C1E; Fri, 16 Jun 2023 12:29:38 -0700 (PDT) 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 BB23E63E8D; 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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768889516308500229?= X-GMAIL-MSGID: =?utf-8?q?1768889516308500229?= 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 &