From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 6571A3E6DD0; Sun, 27 Sep 2026 12:05:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790510758; cv=none; b=pUTlBOykT06zf8e7LSWlSN2aHGPdpQh9FC+jyGT2/3zbltcnxNqD+BxbskWhI5CHQkedAtqcDUQdUiY/uCsGsqkR7Soyo7D0VisPlD6Nyv6E9olVvkczi7GoEjvuNG/92lXRpUwnUASsP3xC/VQX3QMWL59I3bdB94d17mkhzYg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790510758; c=relaxed/simple; bh=vuSmGx+d+J/LvI88LPH30k0DyNekzcAX8xyBFZF+tx4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=f5EolWftRZixJo0jBDzI4TQB2WV4ZgeDYZAXlfCSGOz9xqG6eTjP+QqhICTUW/7IW+qrPG3YqFkDmGlSeUft6T9XbudwlgJIUbjh4YmBpOKsr7/tIE7rv2TGNcyWIuTU4H7C4pqmjb2ssa4+sRUBQ33LslQh5tLpjoQHIlw9cDw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NoV1T2/k; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NoV1T2/k" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89DF41F0089B; Sun, 27 Sep 2026 12:05:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1790510757; bh=s7JRcQFcD/nLSCcRzyB24nV92nZBWi01kt7jJ+1f3Ug=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=NoV1T2/kpMtR6i5MRGmMyCsemTbSIZ8giQ7lc6UOEqNw99Ur0/hgciBBApfxySnOU Ya4FlAUg5YWUPQBEFMOmmOO+cvi1gHWaIMBrxTUnx+ut0BN5Z9Rv+CSw2z/3rWWrng vd+vo32WAVAssZyl5kPAtczL+Vgun269nM/cne6xN5Jm61ahQxntV2WVxcAXZmQOv+ FQ5M6HTHNyvW2LoEH45McbaY7ULV1iUE8eha4mzyNdZfgdpNCuOUG3AAN2077yVwHd QKnLHSkC+Jo1GdB5LBFNl7sYA+w+Y/j6f+EG2csW/UvJky/V1UlAizEJ+/jacMUsrj 45gjVRsF+p6aQ== From: SJ Park To: Cc: SJ Park , "Liam R. Howlett" , Andrew Morton , David Hildenbrand , Jonathan Corbet , Lorenzo Stoakes , Michal Hocko , Mike Rapoport , Randy Dunlap , Shuah Khan , Suren Baghdasaryan , Vlastimil Babka , damon@lists.linux.dev, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [RFC PATCH v4 5/7] Docs/mm/damon/design: document damos quota goal complement flag Date: Sun, 27 Sep 2026 05:05:29 -0700 Message-ID: <20260927120533.50484-6-sj@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260927120533.50484-1-sj@kernel.org> References: <20260927120533.50484-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-Transfer-Encoding: 8bit Update DAMON design document for the newly added damos quota goal metric value complement flag. Signed-off-by: SJ Park --- Documentation/mm/damon/design.rst | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index e82390e77a70..5cd651b1b7aa 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -702,10 +702,10 @@ There are two such tuning algorithms that users can select as they need. that the zero quota is a valid quota, and therefore ``qt_exceeds`` :ref:`stat ` will keep increasing in this case. -The goal can be specified with five parameters, namely ``target_metric``, -``target_value``, ``current_value``, ``nid`` and ``path``. The auto-tuning -mechanism tries to make ``current_value`` of ``target_metric`` be same to -``target_value``. +The goal can be specified with six parameters, namely ``target_metric``, +``complement``, ``target_value``, ``current_value``, ``nid`` and ``path``. The +auto-tuning mechanism tries to make ``current_value`` of ``complement``-ed +``target_metric`` be same to ``target_value``. - ``user_input``: User-provided value. Users could use any metric that they has interest in for the value. Use space main workload's latency or @@ -733,6 +733,13 @@ mechanism tries to make ``current_value`` of ``target_metric`` be same to - ``hugepage_mem_bp``: Total huge page to total used memory ratio in bp (1/10,000). +``complement`` is a boolean parameter that determines whether to use +complemented value of the target metric. For example, if ``complement`` is set +and target metric is ``active_mem_bp``, it is effectively same to +``inactive_mem_bp``. ``complement`` is no-op when the target metric type is +``user_input``. For the metric type, the user should be able to emit +complemented metric values on their own. + ``nid`` is optionally required for ``node_mem_used_bp``, ``node_mem_free_bp``, ``node_memcg_used_bp``, ``node_memcg_free_bp`` and ``node_eligible_mem_bp`` to point the specific NUMA node. -- 2.47.3