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.