From patchwork Mon Feb 19 19:44:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 203241 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp6637dyc; Mon, 19 Feb 2024 11:48:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXXVt/7vQSgzZeYduFWrIik+Pni2P4QCH44f/UygyE/KQ/PFfWBZkgQ/Yf7I9Y8/DpZfLwxMN0Okw4g2iJfJnzYKBHTtA== X-Google-Smtp-Source: AGHT+IEXHnvUFnWluKjPCAaI1q5rjE0NGDKx4KMO3sK/o5WGGt7S+UMhLMsuxIsjaq9hbz6kq59Y X-Received: by 2002:a05:6512:3e06:b0:511:a039:2e0d with SMTP id i6-20020a0565123e0600b00511a0392e0dmr11655006lfv.0.1708372134414; Mon, 19 Feb 2024 11:48:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708372134; cv=pass; d=google.com; s=arc-20160816; b=aY8xvDHlLGHOqWbYi9wXxkHzdhb9/SSP/+lv4Tf7PytZkRKClwN3YqsCPRRqjELyET 95KjUvmrz+Qb1Akl5A1s/sv95PJm41KarJKnjHEKLwFVi5IWVTBoibmo8UB3JI0LytvX MPxAKnsP5q6puvOir8cw57mQ21grPxJzyZ00cE7WBmINTBCwgGYVniRKf3QjBbBozte2 G9dSR4IlTvle5jjrVBrOE6gNrx5BPnkf5HRR8yv/B8L14cWYaYl8EYaImT8YAdUUITPt kkPcZv+blXvsWjTdCo4PAZpCFd0Lds4baImnv7oSP3RqmKUuJMJS1wx99f0uATbJZLES bsnA== 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=AH50pB00vL1ssxOtJIF22yMyJ0UUCrycixUityu75ko=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=TOaUUT1nmP61UcrffUXrVvXqJGvqq69MskCy0D3DbLU1qG9hF4DVKaaY1n9oIOPPJE V/ZZ5w+8fvn5QA2xFg4bpuDXa796sHNNKTRWd7lBJv9B1nN1s/mlArH19Bjdr9qbKwb0 Nd49usWMknYIYc/0DFeAT2D66nW7ibNy+1+PSRJmp41CzTjrz9RVEwviKz8HUzD4/M0Z dUD14VstoprvwJVPk2LH/KpWKMdGbak1Akf0y3aaFmvopzNbzFR7bzLwSPOT7Zqljt7v Gpm6yQIXx2VrhdioJGnXVQ52dxSGEVnW9zgX4O+WU6VtXdbEdoLhgAG7KXgbB8VodXMI 41Ug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rN+wAd4r; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-71897-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71897-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gl25-20020a170906e0d900b00a3e62d5f9c6si1712174ejb.312.2024.02.19.11.48.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 11:48:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71897-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rN+wAd4r; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-71897-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71897-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0A4B81F22C2E for ; Mon, 19 Feb 2024 19:48:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED1675BADD; Mon, 19 Feb 2024 19:44:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rN+wAd4r" 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 47BDF58ABE; Mon, 19 Feb 2024 19:44:47 +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=1708371888; cv=none; b=NdWgradMnkSZpbcJ1n/LaJ8cg0viuIkhMat+PscEV7XqUEtNH5ilHmSfJYXxw0JbaqFIxthemUL5xMEiRJgTQG13eYyOAaLoC4uCph2kBd3rcOebOWIpnx6ph+sXD8bIIeBgtrLTSq/FOZP3i2G3IgDDVV+AcpVlQKo30H+YCqE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708371888; c=relaxed/simple; bh=dE+jqLZYW9QB5NiFklbDnZHaYSFDuOnT6wibaYvQ7fQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=V6CSpID45oPoL3UOUAIop8LyyzyOjdCMwgItGP8u7CaMmoh/AOBivPmYqFPOydJRZovqLJhcOuFR8Odon7OzQhsCKst0S4YELVZcGULNKASK1/ByvfMuwtSm0rYxEHou4bJVqgTLIeBhyeUnlPUyCc5REKIjnSJdgEmjQURtwgE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rN+wAd4r; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A133C43399; Mon, 19 Feb 2024 19:44:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708371887; bh=dE+jqLZYW9QB5NiFklbDnZHaYSFDuOnT6wibaYvQ7fQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rN+wAd4rUpHbmoSCSt+/pVijeH1M2J+z3ioq9IiqpMA7SQFSRjct47t4BrxCbYLzm g+NTWKrJdapNMH3m9ClPNCicsC8FXavIYUJ+PTZpM3XOUKOjufVIRPa+f6MVCL8FKx mnvvP4UR8ztDA3EZAIC758uAZSZn6xL0EAMZAUfFtGXapQSihyvtpmetzNaC/Kghcx UNloo8Ow4xzXJiJmt/6CbhAsy17pIVqzgkj0XUIKlijM/hF+Tkk2+/az2jLdwG67tG ZGw7C9Tdx2lPuF00Kfz/OfYDrG79xQFFIGBkn/Tpc1eB2mhLP1THJX3eXJLAQ/kPEA eQzcGIUVQS9rA== 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 15/20] Docs/mm/damon/design: document quota goal self-tuning Date: Mon, 19 Feb 2024 11:44:26 -0800 Message-Id: <20240219194431.159606-16-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791358018729471743 X-GMAIL-MSGID: 1791358018729471743 update DAMON design doc to explain the quota goal self-tuning, which can be used by setting the goal's metric to metrics that kernel can self-retrieve. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 2bd0c203dcfb..8c89d26f0baa 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -398,12 +398,28 @@ Aim-oriented Feedback-driven Auto-tuning ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Automatic feedback-driven quota tuning. Instead of setting the absolute quota -value, users can repeatedly provide numbers representing how much of their goal -for the scheme is achieved as feedback. DAMOS then automatically tunes the +value, users can specify the metric of their interest, and what target value +they want the metric value to be. DAMOS then automatically tunes the aggressiveness (the quota) of the corresponding scheme. For example, if DAMOS is under achieving the goal, DAMOS automatically increases the quota. If DAMOS is over achieving the goal, it decreases the quota. +The goal can be specified with three parameters, namely ``target_metric``, +``target_value``, and ``current_value``. The auto-tuning mechanism tries to +make ``current_value`` of ``target_metric`` be same to ``target_value``. +Currently, two ``target_metric`` are provided. + +- ``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 + throughput, system metrics like free memory ratio or memory pressure stall + time (PSI) could be examples. Note that users should explicitly set + ``current_value`` on their own in this case. In other words, users should + repeatedly provide the feedback. +- ``some_mem_psi_us``: System-wide ``some`` memory pressure stall information + in microseconds that measured from last quota reset to next quota reset. + DAMOS does the measurement on its own, so only ``target_value`` need to be + set by users at the initial time. In other words, DAMOS does self-feedback. + .. _damon_design_damos_watermarks: