Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1335335rdb; Mon, 19 Feb 2024 11:45:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWzB1TQSmHxMBi5oubC9Ok8gTfmi3JYPJxd5YLowKw4ltqM7G6dZu47kZkmi3nwz6aSQVmVEuxxNIthERvZ9YL1w0CSdfGqdiMubAT6Zw== X-Google-Smtp-Source: AGHT+IExZEBaJA6WY4RSIpwxbcfiOCYFU1BBCxTHdDypzB7jlR9lAdg5UarkMA1IRw+9psT6O1+C X-Received: by 2002:ac8:7d90:0:b0:42d:df5b:ae3d with SMTP id c16-20020ac87d90000000b0042ddf5bae3dmr17811932qtd.3.1708371949470; Mon, 19 Feb 2024 11:45:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708371949; cv=pass; d=google.com; s=arc-20160816; b=aCsXrLVZRMZzRAkFTZnlSqG/SzrWJWkE3nLWwt9na4wTk1SJfu0/J5YYKtFTe4lvOZ B76yxxFm2OnH7/LIzMwqxNwMrwPSulT/mSd4mXJQqZzSqe3AS/mHBYC7rHfb63p8jb5x pni9wsVnYuh+SCynhg+SUxIhxPFy2dEx3+KJDDtBmo8hiQpC6QyRzEBrNw7FxFR21NgR gkimv69sFyRrHdZcW0uPcQbL9dv9G+3Uq/J1vgL2fTrjCBH4SZeL9Cd1a6P8Zo3G4qg5 p0ticyb7ogv/3LpZKMWdfcuCtxgVhI7IAOIiIGTTJcqch4KJbZz/dvhSTfB64TAfQETh fRxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=SRDCctGY6qtGU8lGbKUE5wni1l67EM3vmJhAhZajsSA=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=uuhwt9cfvwuIsmVNyenpyd9Sn0j9wGz3H9o3djoBq2ip6MtaIoUzeh4GQWGd1BhElr 08zLsx5JSO4FefhLJyPrX43rmuKDCK8YUk/0Xwr+FaduDpCqMVwvm5+6leTz6/i0kWAC 7Z5xRzBOL6RS+C/Ry/Y27OZECk6a1Bb2jiReP+uxzk2N0Puc2UAGxMNf2LmsPxbeBixT z0HUR1jHh/2DXDKjwoFLJNP7kROypxb8ILUm2M50mvfb6LxncalrNyoS3KtS6Nkwqi8K b5Znpgwo/zI+5v7bWbKJahk9XU58q7L08bG5RkX0d2G7ZYHYL2ck7PRIxRfBAf84dcA/ X2UQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q3JlR1TM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-71886-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71886-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 22-20020ac85956000000b0042c2b67e263si7658872qtz.571.2024.02.19.11.45.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 11:45:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71886-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q3JlR1TM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-71886-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71886-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3098E1C211B0 for ; Mon, 19 Feb 2024 19:45:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 44E2B54725; Mon, 19 Feb 2024 19:44:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="q3JlR1TM" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FE2153812; Mon, 19 Feb 2024 19:44:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708371882; cv=none; b=NrsgyozpI2TaRqjFRLxxjJVbO+NdnAayliLZ1U/NhI1CmcYz4Td4wwuJcBhqtowF/6isEnJIL4LSjBtJMmj4RnKJYAlqdbHvKU/zsyjdNNCo0o0eIUFK5VwURH+/SGWlr2NHlISn80b40wgmwoZRKxO1AvC1dEiAXsLJpr8wcqY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708371882; c=relaxed/simple; bh=Kc80eiLjIjFfjUUzf1ec4uqhs3PwKD70+PMFGRlYm9w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=ZtM0fisApGOZqxpID6NWTfxehVIF3d1C0ICJYNYxqxyAwaAchrCtbFrxtRpBIJFOeeGkx8JQduFVtAMcNGwqf/OhhzOrd0J76vb8k/c1V2NSA5W60Bw4r+1om1780lPg2Ely4EJGO3XteVAjfCL8I0QX3upudhbUGiixeZqxvxo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=q3JlR1TM; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E787C43390; Mon, 19 Feb 2024 19:44:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708371881; bh=Kc80eiLjIjFfjUUzf1ec4uqhs3PwKD70+PMFGRlYm9w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q3JlR1TMBd4SZipJkxguG3s3i9iwsqiUwe8NWYu9g5VarCQPcboEKYUol/8Ltw02/ 7lVy4f/dwVLcQIzZq2RwxsBGYZPGlnDwh/ncGthYhY+xGOxovBI2rk5qA8CmR4V3P3 rOgyHFgBbl7gBF7thKUeezEPey8JCAxfIjN1twH61U5pqFdIxT4PvAa4FHXrrhIGiu SUCph24Jhh8qdoNRJzRpTQnRUE1/Y3Xx91lMc263hFrZIgsAzmpfyQ+84r5OHWFwKQ cJ7bWU4XUwCN1ukCpTJBEgtQk1D5I6a6/1+YdOXyMFDGXpSrXK3/fhvNVVsDoZ+ZTV f7hbn9PJKUiPg== 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 05/20] Docs/admin-guide/mm/damon/usage: document effective_bytes file Date: Mon, 19 Feb 2024 11:44:16 -0800 Message-Id: <20240219194431.159606-6-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240219194431.159606-1-sj@kernel.org> References: <20240219194431.159606-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update DAMON usage document for the effective quota file of the DAMON sysfs interface. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index db6620b5bc0a..220ebbde7324 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -83,7 +83,7 @@ comma (","). │ │ │ │ │ │ │ │ sz/min,max │ │ │ │ │ │ │ │ nr_accesses/min,max │ │ │ │ │ │ │ │ age/min,max - │ │ │ │ │ │ │ :ref:`quotas `/ms,bytes,reset_interval_ms + │ │ │ │ │ │ │ :ref:`quotas `/ms,bytes,reset_interval_ms,effective_bytes │ │ │ │ │ │ │ │ weights/sz_permil,nr_accesses_permil,age_permil │ │ │ │ │ │ │ │ :ref:`goals `/nr_goals │ │ │ │ │ │ │ │ │ 0/target_value,current_value @@ -153,6 +153,9 @@ Users can write below commands for the kdamond to the ``state`` file. - ``clear_schemes_tried_regions``: Clear the DAMON-based operating scheme action tried regions directory for each DAMON-based operation scheme of the kdamond. +- ``update_schemes_effective_bytes``: Update the contents of + ``effective_bytes`` files for each DAMON-based operation scheme of the + kdamond. For more details, refer to :ref:`quotas directory `. If the state is ``on``, reading ``pid`` shows the pid of the kdamond thread. @@ -320,8 +323,9 @@ schemes//quotas/ The directory for the :ref:`quotas ` of the given DAMON-based operation scheme. -Under ``quotas`` directory, three files (``ms``, ``bytes``, -``reset_interval_ms``) and two directores (``weights`` and ``goals``) exist. +Under ``quotas`` directory, four files (``ms``, ``bytes``, +``reset_interval_ms``, ``effective_bytes``) 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, @@ -332,6 +336,15 @@ apply the action to only up to ``bytes`` bytes of memory regions within the quota limits unless at least one :ref:`goal ` is set. +The time quota is internally transformed to a size quota. Between the +transformed size quota and user-specified size quota, smaller one is applied. +Based on the user-specified :ref:`goal `, the +effective size quota is further adjusted. Reading ``effective_bytes`` returns +the current effective size quota. The file is not updated in real time, so +users should ask DAMON sysfs interface to update the content of the file for +the stats by writing a special keyword, ``update_schemes_effective_bytes`` to +the relevant ``kdamonds//state`` file. + Under ``weights`` directory, three files (``sz_permil``, ``nr_accesses_permil``, and ``age_permil``) exist. You can set the :ref:`prioritization weights -- 2.39.2