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: 13453388 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 E60BDC4167D for ; Sun, 12 Nov 2023 19:46:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DB0BA8D0023; Sun, 12 Nov 2023 14:46:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CEAE48D0021; Sun, 12 Nov 2023 14:46:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B3E488D0023; Sun, 12 Nov 2023 14:46:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 9D33E8D0021 for ; Sun, 12 Nov 2023 14:46:25 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 7F640120273 for ; Sun, 12 Nov 2023 19:46:25 +0000 (UTC) X-FDA: 81450333930.28.9723F0E Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf20.hostedemail.com (Postfix) with ESMTP id 449C21C000F for ; Sun, 12 Nov 2023 19:46:22 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=m6SJsMg5; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf20.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 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=1699818383; 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=XS3UL1qnVy5BbCEeiz3ohjPhuQAd1jZWYS8apOgyf0A=; b=XUkUwoxoKX1j+7omJSaC4OISn/aKWBOkW51XtLLslRbIvrrPG+a0+GYbnX8R2Q4LLNlx+Y cBzuTkxHy3fpMvHJ2mvkm6TcyxltEImrvKJKR80qa+NBHdZOZa4QMOc6C8qbyddz6907Nz HOXOAt2T8DUX4jbbynZs7tYSoleaCNo= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=m6SJsMg5; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf20.hostedemail.com: domain of sj@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699818384; a=rsa-sha256; cv=none; b=oELRdBGm+NGhs3OpwQFTyk4UuDjOVu+h4fvRumfh7fVdHjsw/LGgvhUBlLl6RblJ63az/I Nu5CNHK5TNtIjYQkXxPAQC48QT0mhIcTrOAzSaTMkFHdY842Nw83QkATdg/7RMiy6yiNsJ YeJLUDXVuk87mMUl3cTXs93z5AdWNww= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id B5BA4CE0F30; Sun, 12 Nov 2023 19:46:18 +0000 (UTC) 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 To: 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-Rspamd-Queue-Id: 449C21C000F X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 4nwjj1fmw7krgpyqeaaz7bqnk5botpj3 X-HE-Tag: 1699818382-371690 X-HE-Meta: U2FsdGVkX19zxCL4kvuOCT4QrBNbZnNNMNhb13U4T85uhYUiyvhRXtrbMYEzLH65qMUxOqiuP7qkJVIx/4x/bKW9oejBNgh1AUzQwbdNlQZvAcbiAxJH81my5rouR0sk5NtcmV/Ozd+end33E45z0yUc7KMrCeO99zVYRePB7vnK8unoA1RNJqnE9yKy6NwhrgVaS12cibj/pBI2x2zx6NqrHoO2qIfniU9K5aC1ycFdJEAtL72KwHmYgT5krPPXt8fevcrD3Zs70YRgbahyoCN2RI863TMeMvBLlLaU3lzy5uLU1UYeT3RU+w/2yNe5tUe3OhSUbcy8EFpxr328E2XJRCNWzyswMozpUX+DICBoOHN4m0kAtUvIHu63dkmq0vIp2EpTwAJfs8tcJrY1m9puVkJs/KQ2vJUyNVqrp2um8y96Wi5rK0VftqmXJHE+uoNHSgyIkCx16KqfiKjWAj0KjRyyXqKCX3ihs8EfexOzRe2/dan562Eec3LhzcmhRGeR7Z41c1ECXiABzp//p2H8Hf2NMiw3wVsYUk59cyxHzukeiYhF6k4te6GzzTjYCHFygW2EcXL0QsPYR7JSRsGLcTDni4iMmqt5OeWWuA4vH8N3VmDTwBArCPE/Q72GXzLgcFue+6XQdz6Nyok2c1cFK+NBjcymvpwRXCwBQ1eBP9ebkm4uMv8FQnu5At7PF3duhsz1cFB0jI/6QW9Fk0/18FfNsNX+3tgg3JKpXi0qpnB5IogFS/NTE53yUGAGYrDoIlOUs8G5wRDVDvby4Irw6scq4HKWkdJOAItYtgc/368cIj8HnGij5ABJ0pClNNkNpfHNUNy2YIZeazTT26q+RHBkWvT2LbSWhdKfsUUAl3osQcAK+M+6V8tkuNiSwyIqCdn1r8Xtw8S/L2j9qOO2bviiYqL6vGAria4+QmdAu7Doym5kl4pktMu5IQjmBTaBwAKi5jxmfAB31JI ilwePTuY dKVtUbp+qIw3raeKvbxbadPm3DuyGN52iwIu+gzYwZonb6fFqyA6DopoCwCSueKrE5m7C7nBaBvuz77s3L9go/68CJoTm1CDEhB9msYMfgTJtBF4UAHKILyo+wKhIzwceYAYAhQec2q3DgSCA4C4V+UTjI+t8NunJnJZfxYJiex77E4qpLYDpl600XXkxi6jMZu+4YZjw6Ytmb8/7nj+u6sUWzvEfV4wDM7pGVox+AmQFaw0FBYNVfyWxtCeUkrF+RiYUe1FP2qSMsiEva0flOoxyzp43V00FebPt X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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/ -----------------------