From patchwork Sun Nov 12 19:46:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 164284 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp840768vqg; Sun, 12 Nov 2023 11:47:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IHK9cSS+itjYB8WH5r/m29mPQqqIwrE5Bse3oK1HkPK8f4vPeBJCBnuN5khDDC47ozXT2Lv X-Received: by 2002:a05:6a00:6711:b0:68f:cbd3:5b01 with SMTP id hm17-20020a056a00671100b0068fcbd35b01mr11691764pfb.13.1699818449122; Sun, 12 Nov 2023 11:47:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699818449; cv=none; d=google.com; s=arc-20160816; b=W/2hPK110d1dSL2dobc/615kSAyStbTy/lk1Qb33tgimd0/wtBnc7KeN5h/zmXj+D7 aE0/OdEJ9VPthOO3avakS/wYGHNhkVl8udr6eVP5ZeTm8TJ+cEWBAjUbbeShNrao/1jJ +fFtFoqKo3tu3yLCHwZM1wIGjYXUnX41sRYgxdzgyd+S/V9aU1j/i1ipLK5UIYKQ51BW 8ZkurRtk5hnn3mRtZF29DUx/q2Svq4sdkzoS1hfomcQ8wlSBeNYRS9+8ORt4htJPIGqn URdCs/XY5xW16zOx+XdVyF4tnq10RhxHLCgLzUlePF6H2V1irQrsRP5IqRkKsDjGuown 1XAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=XS3UL1qnVy5BbCEeiz3ohjPhuQAd1jZWYS8apOgyf0A=; fh=cjv8+TZ63Co1l5yw6pZdw5NyP6++sWCb693WxBRE0rY=; b=0+Wa17CSyqgPIngKFrevBm4fli9OE3JfItQMR/xpO8SykXyeQ4yOmNuECHRh9Co2m+ 30CPVv9LjAXgASo/P5tRKCROYN05klpSXivbMkhUjAjE7lGxLO6QjLFAuMhs4bLjqYj5 UnpoCwe8beqqPW7OYd28GiTATQXOyjX9qCJneyuI5+WsGrRwTZ89PQ325ZI3gNq4KjnY 2u59HU20mzH++yukHZ/LdlFPTkItj1xPZLtw1CSw1J6356vlIO3kHpoVSgDPcqJyUBag 9gGjROb1/gXENQ1x1AyCrYnqhWiFsVvqN5ol3ayD9JJJxlsDeNCigyttY7+sIikEU6C7 hx0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=m6SJsMg5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id m21-20020a656a15000000b005be10ed80d9si4542823pgu.177.2023.11.12.11.47.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Nov 2023 11:47:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=m6SJsMg5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 9D93F8086827; Sun, 12 Nov 2023 11:47:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232601AbjKLTqn (ORCPT + 30 others); Sun, 12 Nov 2023 14:46:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232239AbjKLTqV (ORCPT ); Sun, 12 Nov 2023 14:46:21 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EE442139 for ; Sun, 12 Nov 2023 11:46:18 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D91CFC433CD; Sun, 12 Nov 2023 19:46:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699818378; bh=fBe7fu6fdhvjb2Vl3O+hHCTrOe9yrQAdsDE2H6K6JUw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m6SJsMg5KavzlrZgEup4w6srQLVMAzL1OT3+mkIGn838VdebxO4YPThMRTBxbHVjW arJxb9kZ9SKHg0X2BJUxftHNHaTNPpPTXR8N974jOsMd+MJc2mvO6cCvMf5pMKR2NX lHbrm8j2ERD7CrCkcHxTVFX+jc0PdTLZ8B+CmqEXc2xjnLcOghjG8oRZpNLFiTBHFr LZm9mfo7sUjlJu8DyHzMB55sUkkjMsO/+XXGDDSeH5GvHbyL2WuuXhy5UwbvB+LrGD eBq+cYwgAFEVvUJR5V+BJ+pMei61W+C9LpZYo+csOCuMf/OiQ/LPjZppZRFO6smDq2 23aDyqdfNzXhA== From: SeongJae Park Cc: SeongJae Park , Andrew Morton , Jonathan Corbet , damon@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 8/8] Docs/admin-guide/mm/damon/usage: update for quota goals Date: Sun, 12 Nov 2023 19:46:07 +0000 Message-Id: <20231112194607.61399-9-sj@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231112194607.61399-1-sj@kernel.org> References: <20231112194607.61399-1-sj@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sun, 12 Nov 2023 11:47:18 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782388830225794175 X-GMAIL-MSGID: 1782388830225794175 Update DAMON sysfs usage for newly added DAMOS quota goals interface. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 25 +++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index da94feb97ed1..3a2d308ca1e1 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -83,6 +83,8 @@ comma (","). :: │ │ │ │ │ │ │ │ age/min,max │ │ │ │ │ │ │ quotas/ms,bytes,reset_interval_ms │ │ │ │ │ │ │ │ weights/sz_permil,nr_accesses_permil,age_permil + │ │ │ │ │ │ │ │ goals/nr_goals + │ │ │ │ │ │ │ │ │ 0/target_value,current_value │ │ │ │ │ │ │ watermarks/metric,interval_us,high,mid,low │ │ │ │ │ │ │ filters/nr_filters │ │ │ │ │ │ │ │ 0/type,matching,memcg_id @@ -123,9 +125,12 @@ Reading ``state`` returns ``on`` if the kdamond is currently running, or ``off`` if it is not running. Writing ``on`` or ``off`` makes the kdamond be in the state. Writing ``commit`` to the ``state`` file makes kdamond reads the user inputs in the sysfs files except ``state`` file again. Writing -``update_schemes_stats`` to ``state`` file updates the contents of stats files -for each DAMON-based operation scheme of the kdamond. For details of the -stats, please refer to :ref:`stats section `. +``commit_schemes_quota_goals`` to the ``state`` file makes kdamond reads the +DAMON-based operation schemes' :ref:`quota goals ` +of the kdamond. Writing ``update_schemes_stats`` to ``state`` file updates the +contents of stats files for each DAMON-based operation scheme of the kdamond. +For details of the stats, please refer to :ref:`stats section +`. Writing ``update_schemes_tried_regions`` to ``state`` file updates the DAMON-based operation scheme action tried regions directory for each @@ -319,8 +324,7 @@ 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 -(``sz_permil``, ``nr_accesses_permil``, and ``age_permil``) in it exist. +``reset_interval_ms``) and two directores (``weights`` and ``goals``) exist. 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, @@ -330,11 +334,20 @@ 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 +Under ``weights`` directory, three files (``sz_permil``, +``nr_accesses_permil``, and ``age_permil``) exist. +You can 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. +.. sysfs_schemes_quota_goals + +schemes//quotas/goals/ +------------------------- + +The directory for the DAMOS goals. + schemes//watermarks/ -----------------------