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++zUNZPrOhUNoIRyCXwj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ter, 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.