From patchwork Sat Feb 17 00:58:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 202524 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp84003dyc; Fri, 16 Feb 2024 17:03:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWJoohFEVKWoEfdlnuzppnNNtpkBzD1ydvefzzr64iVi7b/m/IjMx9jc52EM1qLA2HaH0NkOweBjPlQ1/KecxB26nghYQ== X-Google-Smtp-Source: AGHT+IGJalQZ21WufTzEQnp2Mt4sZ0apQrGJE/Yw0L5li0qYrt+N6aNWOgoLd1T9MKosvkW45Bsm X-Received: by 2002:a05:651c:509:b0:2d2:215e:157c with SMTP id o9-20020a05651c050900b002d2215e157cmr1384471ljp.7.1708131792480; Fri, 16 Feb 2024 17:03:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708131792; cv=pass; d=google.com; s=arc-20160816; b=cEie6pzzkHjLuWLzc/hN5fggl8PvztXT8tzRDww7KJXyURAPKpJUDikefxZdfj8M1/ bWgWGD6k1lUF2EsuEKcxeqPiilWPseOa2VipUAnfHli6fwA2pN9bx4qfWTcdDgOX0Ssb 9i9fi4IbPEm5+7672J/dXpXHKvl+ceLI+cgIHXouELTU0EVEALadtZZffKvRY0681p7U 9PrlY+0TLJ/O3oK9vpV0tCYUhaEl5Q3LD21pRfSMVqg7iLeLzX3SvezbcxQU455Z99Ib BeXed45u9fawMPVePwFemsuM3A2OvAqlP8/q7RFHuvMtSk+BjViGKwHqV9e7MSl9nF6v /c5Q== 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=bI4Sh5OJOcqb8lUNVDYtGA3aqdSh4OYOhW5DJRNgYTY=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=oT2Ma2bzcSrcy/27DsA6P4Y4mWaF+N38tA2w4Hv6dfhYViNSrEInzDyWAaaMJIj4ne OeO3iucSErmaqP2vxYKsles6W7PKCnhVrk2HLcz7D8dagxsCz1bausvibZLGO1hSDi9u U19mOAwsS3+PvlkPLLmigSVG3HkIK2mLrvY42mFlI4uAr38FfAUYEZZzAbAHLuWGPBOO a3w2MqNQCP2B5uJ0wimyHMW5rXMDzueQeUtngxZtOCeZEMZEQo5blWRTEaac3T+aU+m4 IQN2MidOnNZ8W0wk/mk5xIdIFN7rLkHFTFCSmhn0T28iaju27C49cZB4KEHqz27N7Htg 8ZGA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sAnP8Y39; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69604-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69604-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. [147.75.80.249]) by mx.google.com with ESMTPS id c22-20020aa7c756000000b0055ee8d246e6si429572eds.204.2024.02.16.17.03.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 17:03:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69604-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sAnP8Y39; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69604-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69604-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 195161F21487 for ; Sat, 17 Feb 2024 01:03:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 059D825602; Sat, 17 Feb 2024 00:58:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sAnP8Y39" 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 DD6711B5B3; Sat, 17 Feb 2024 00:58: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=1708131528; cv=none; b=nJHYiw96uDF1HwMERUrNfDV5SGrhE6skjPyqEOZvG8a2MohKkP0SSJqo0H1Cak5sWkt+XZCpxpFBebBl254+mfrKM/g+pI3ysOeNTRqTcCMMoG5cKjvMjtem2SziQ8eSavoFvDAQKworCW2sJqoQrUQbifxMVKDMWSaxOADGKMk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131528; c=relaxed/simple; bh=Amv7MsMRrFhTpSKvV6b53ASGSJnoAb83web7cZHL2Xc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CWhIDH8hIFjV19P2oNGet8K0Idzkyd3455/sQv9HIIIqr/cQFeaWELKNPNXTMoLmJt65JxjPonbAVDUm175AQ0W9p6Nf9zdokwTB9daFND487WOAcrCi1qZeRgYWWlmXR82Dg8se2cl/nerA/EfcSctrHCccbmx4fNjyMM74DO8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sAnP8Y39; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9018EC4160D; Sat, 17 Feb 2024 00:58:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708131527; bh=Amv7MsMRrFhTpSKvV6b53ASGSJnoAb83web7cZHL2Xc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sAnP8Y392axNOEc8YRW/0sLDcxwLLHJPPXLuM6vPeVUqHE9FZZ/BorXpOA8r46Lfe aZFCAYNsDJYrS2BSgzsvoHGCGNdYJwdwkZCXotxUD+CrxbXlossn69i4lNDZDDN9/S qauCf0OHvQfTTOGIw7WEGv+QabZEoJiePobg1Iv1ZlICP+jxERy+4cqGy9v0tqXoRp xff7mNIotAANdwocgZQ5Ap6kzQs3DuaXmJwU5j0xOURVwc9cGhqGxAD3GGTcOE9lpg ZmA34gsmsrJ9cJ4Bhhbbezp0nsFTU+wZcYyV9lG9IPuHGrsll0j6aelOHeoESW634c xNlHDVxJQYEZw== 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 1/5] Docs/mm/damon/maintainer-profile: fix reference links for mm-[un]stable tree Date: Fri, 16 Feb 2024 16:58:38 -0800 Message-Id: <20240217005842.87348-2-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240217005842.87348-1-sj@kernel.org> References: <20240217005842.87348-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: 1791106002339346669 X-GMAIL-MSGID: 1791106002339346669 A couplt of sentences on maintainer-profile.rst are having reference links for mm-unstable and mm-stable trees with wrong rst markup. Fix those. Signed-off-by: SeongJae Park --- Documentation/mm/damon/maintainer-profile.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/mm/damon/maintainer-profile.rst b/Documentation/mm/damon/maintainer-profile.rst index a84c14e59053..5a306e4de22e 100644 --- a/Documentation/mm/damon/maintainer-profile.rst +++ b/Documentation/mm/damon/maintainer-profile.rst @@ -21,8 +21,8 @@ be queued in mm-stable [3]_ , and finally pull-requested to the mainline by the memory management subsystem maintainer. Note again the patches for review should be made against the mm-unstable -tree[1] whenever possible. damon/next is only for preview of others' works in -progress. +tree [1]_ whenever possible. damon/next is only for preview of others' works +in progress. Submit checklist addendum ------------------------- @@ -41,8 +41,8 @@ Further doing below and putting the results will be helpful. Key cycle dates --------------- -Patches can be sent anytime. Key cycle dates of the mm-unstable[1] and -mm-stable[3] trees depend on the memory management subsystem maintainer. +Patches can be sent anytime. Key cycle dates of the mm-unstable [1]_ and +mm-stable [3]_ trees depend on the memory management subsystem maintainer. Review cadence -------------- From patchwork Sat Feb 17 00:58:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 202541 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp86958dyc; Fri, 16 Feb 2024 17:09:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXUMJh42RiNELxrnUXYdXtpyIZ8+fHTspRfHrI172jL6DgOGCSSnMg+fN7QWFyPCKhahNEFMOOww22tRARu6X/hIsfXQw== X-Google-Smtp-Source: AGHT+IFY2bgY5ZlL+BjP+jVbCt0t3BP8Ex34iJSCSe/ry5fFir3592gVTt0Y2QlplNzI9eIIA+QO X-Received: by 2002:a17:902:d486:b0:1db:b36c:7165 with SMTP id c6-20020a170902d48600b001dbb36c7165mr2803649plg.14.1708132186249; Fri, 16 Feb 2024 17:09:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708132186; cv=pass; d=google.com; s=arc-20160816; b=PUlGLwkaccQo+GJOKb6L7RBhTASiHHONYnvSq+iV+sImYCUCL68xT0w+MN5qPlXQsU mbSpVSJjkeKyMMqO3gwyK8Qc2OKYtXYLbBXqlJx/OQEGT3J77I36gSxfkklHp8XEU2Hn RD+iFL2sdbctNtVfBOlRKCTxpos+qR3oF46Nbw4dlAvbuiA8XqWQec3ge24rFh6qjAfb tQv7US8m9s2Ln3hzVAjv9os0Q7u0wjtT5Px8JeqyiH465AfP4FBGI2ysZBi1kiZnCj8o xyCaSOo4FQcVjCCVg/qapCMmX7LMJxUx04ZN64dOB100Ki95r1QAah5QFfc/oU+eKcnD SnbA== 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=rkytF4J4Jg9lwSSrwHvDWXBUGqs0QkBT9IVd0tsJCJ4=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=hFQ3tCreD1sPQMwEEDQNWrTgOxdh0qxksNGm3Dp+NV3If0J+1Iup1q3Xm3WGdo9WQk 8fe4SvgxcceSD3gcj483wv9bdGwizGwDAX+hGGVFqiB/wckJUesLuZI5ckSS+Ve5W7ax x5Mu+y6b7DUS78xnnRUMENfgsTErGPNnSoDEmwdgL5LiZO8ineAMbjMQLHqhnzZZU4Y8 UJVTw+MIVYGbbHsxFAdcwAj5z9FBYz04d64kOkrJbvDUxkG1GjIrlrC+9k9UI69FvrtZ zn+orVVly0Wq5SBujSZQmQ+lrQBeKx0wfz1brN4naXv7FlqSXSl+4+LvpkGf0RXT0M0n hpBw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ab1s7a8Z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69605-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69605-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u7-20020a17090341c700b001db35462886si687460ple.22.2024.02.16.17.09.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 17:09:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69605-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ab1s7a8Z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69605-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69605-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 78454B224DF for ; Sat, 17 Feb 2024 01:03:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2600228DD1; Sat, 17 Feb 2024 00:58:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ab1s7a8Z" 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 41A731B80F; Sat, 17 Feb 2024 00:58:48 +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=1708131528; cv=none; b=qOvYOpeYqJWT2ZzLAQcAiyA18b1hfma/ykMpZlkTCv9WLOJ4aQq7ASccP6ZTo/ON3euxNAtraJQzA1VgZGsiph5bqjspyFYEkqJLqiupZTClz7W7sztnfIwxvNx3iJOy8vF3VBhV8JvGO0/7BAYpeIWKMQUG7QE3bTzVo2yuc0g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131528; c=relaxed/simple; bh=ZF7Ys29G8g/k6D1jFHkNld6ID7JrPCUQzMebjrLS5cc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DLm5Y1xswx8lGGuvCA+3gmcRW5S1hBfGm2vTcj3Lq/8bMJRLk/q0hPn1r1vAj29Ek/gjgNTXexeUf3dHXElir4EKBBjgDFQl5jMsfCX8Dhm5h/cggINih7NxLatYaRs+vC1YRD8rjED2m3VlxFQc3Ut0vR+8kdv0/VSheFc/6sY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ab1s7a8Z; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A969C43394; Sat, 17 Feb 2024 00:58:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708131528; bh=ZF7Ys29G8g/k6D1jFHkNld6ID7JrPCUQzMebjrLS5cc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ab1s7a8ZVMd65Gov613sVFUA9Z1HOsB0ADjuIBE2ac+9N/3GFt/fZ3Jh3yqR3KlAU ZBCbYFIJ/7sYSlVdaUALdwiw7n5Vz70vwWf/AMYu6WrYE30mAQ5MznaR6kRP2y/VwZ eApMMw8nps4ukwaCWHjwmqguvLzL6Z7xRQBAmFLZfPLPv5aG9wQAYvZvMcvBsKcOTQ go4PJwvFy2JnFHrjrtignzt40wD0jMQVyWcqbkCYt37sb71r90hFvv3Ib8T5u9ZP9w P1SYlEYr2cLkqkL8Q/QYAVJOpFM2r/ZPc5tslHjzZIMxnD2DQGrKbNzR5QMRQkwm0G TEa6NN702cKYQ== 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 2/5] Docs/mm/damon: move the list of DAMOS actions to design doc Date: Fri, 16 Feb 2024 16:58:39 -0800 Message-Id: <20240217005842.87348-3-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240217005842.87348-1-sj@kernel.org> References: <20240217005842.87348-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: 1791106415299641345 X-GMAIL-MSGID: 1791106415299641345 DAMOS operation actions are explained nearly twice on the DAMON usage document, once for the sysfs interface, and then again for the debugfs interface. Duplication is bad. Also it would better to keep this kind of concept level details in design document and keep the usage document small and focus on only the usage. Move the list to design document and update usage document to reference it. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 47 ++++++-------------- Documentation/mm/damon/design.rst | 26 +++++++++-- 2 files changed, 36 insertions(+), 37 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 58c34e66b31b..0335d584956b 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -302,27 +302,8 @@ In each scheme directory, five directories (``access_pattern``, ``quotas``, The ``action`` file is for setting and getting the scheme's :ref:`action `. The keywords that can be written to and read -from the file and their meaning are as below. - -Note that support of each action depends on the running DAMON operations set -:ref:`implementation `. - - - ``willneed``: Call ``madvise()`` for the region with ``MADV_WILLNEED``. - Supported by ``vaddr`` and ``fvaddr`` operations set. - - ``cold``: Call ``madvise()`` for the region with ``MADV_COLD``. - Supported by ``vaddr`` and ``fvaddr`` operations set. - - ``pageout``: Call ``madvise()`` for the region with ``MADV_PAGEOUT``. - Supported by ``vaddr``, ``fvaddr`` and ``paddr`` operations set. - - ``hugepage``: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``. - Supported by ``vaddr`` and ``fvaddr`` operations set. - - ``nohugepage``: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``. - Supported by ``vaddr`` and ``fvaddr`` operations set. - - ``lru_prio``: Prioritize the region on its LRU lists. - Supported by ``paddr`` operations set. - - ``lru_deprio``: Deprioritize the region on its LRU lists. - Supported by ``paddr`` operations set. - - ``stat``: Do nothing but count the statistics. - Supported by all operations sets. +from the file and their meaning are same to those of the list on +:ref:`design doc `. The ``apply_interval_us`` file is for setting and getting the scheme's :ref:`apply_interval ` in microseconds. @@ -763,19 +744,17 @@ Action ~~~~~~ The ```` is a predefined integer for memory management :ref:`actions -`. The supported numbers and their meanings are as -below. - - - 0: Call ``madvise()`` for the region with ``MADV_WILLNEED``. Ignored if - ``target`` is ``paddr``. - - 1: Call ``madvise()`` for the region with ``MADV_COLD``. Ignored if - ``target`` is ``paddr``. - - 2: Call ``madvise()`` for the region with ``MADV_PAGEOUT``. - - 3: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``. Ignored if - ``target`` is ``paddr``. - - 4: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``. Ignored if - ``target`` is ``paddr``. - - 5: Do nothing but count the statistics +`. The mapping between the ```` values and +the memory management actions is as below. For the detailed meaning of the +action and DAMON operations set supporting each action, please refer to the +list on :ref:`design doc `. + + - 0: ``willneed`` + - 1: ``cold`` + - 2: ``pageout`` + - 3: ``hugepage`` + - 4: ``nohugepage`` + - 5: ``stat`` Quota ~~~~~ diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 1bb69524a62e..9f16c4e62e72 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -294,9 +294,29 @@ not mandated to support all actions of the list. Hence, the availability of specific DAMOS action depends on what operations set is selected to be used together. -Applying an action to a region is considered as changing the region's -characteristics. Hence, DAMOS resets the age of regions when an action is -applied to those. +The list of the supported actions, their meaning, and DAMON operations sets +that supports each action are as below. + + - ``willneed``: Call ``madvise()`` for the region with ``MADV_WILLNEED``. + Supported by ``vaddr`` and ``fvaddr`` operations set. + - ``cold``: Call ``madvise()`` for the region with ``MADV_COLD``. + Supported by ``vaddr`` and ``fvaddr`` operations set. + - ``pageout``: Call ``madvise()`` for the region with ``MADV_PAGEOUT``. + Supported by ``vaddr``, ``fvaddr`` and ``paddr`` operations set. + - ``hugepage``: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``. + Supported by ``vaddr`` and ``fvaddr`` operations set. + - ``nohugepage``: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``. + Supported by ``vaddr`` and ``fvaddr`` operations set. + - ``lru_prio``: Prioritize the region on its LRU lists. + Supported by ``paddr`` operations set. + - ``lru_deprio``: Deprioritize the region on its LRU lists. + Supported by ``paddr`` operations set. + - ``stat``: Do nothing but count the statistics. + Supported by all operations sets. + +Applying the actions except ``stat`` to a region is considered as changing the +region's characteristics. Hence, DAMOS resets the age of regions when any such +actions are applied to those. .. _damon_design_damos_access_pattern: From patchwork Sat Feb 17 00:58:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 202525 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp84297dyc; Fri, 16 Feb 2024 17:03:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXrytLcLAoYHYEDSsToZxkZt5vN7rJ1tfnM6YFeyq8LYVl0cKJb9rYaxQxKp6gEEoKYunBdnQe8YVxawJH1W5k6w+gLQA== X-Google-Smtp-Source: AGHT+IG5WLOq5uC1oeZG1gUqr6BQ/NfvBCZ3RThtcSDjGaKyAX21OnobeGQjHAZLRk0e/AwKREEb X-Received: by 2002:a05:6808:2388:b0:3c0:4129:9467 with SMTP id bp8-20020a056808238800b003c041299467mr8286257oib.0.1708131826403; Fri, 16 Feb 2024 17:03:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708131826; cv=pass; d=google.com; s=arc-20160816; b=pa6RjSXQdaCidwTapkLgg4w/R0MooxegTdK08IxNggxR2yXRlzHbql8PbRO3fHVbH2 IF4l02CPc081CwW9mg/E98J5ntQU5j0wkQ3qMDfRlNyx2vIUH+9uPbX6/mRUSifXXKjA i940nL7eb0RBGqIX9TLKLFyGBVL7wbeHftGUSTmxV2ff9YLWPQI/SNWrb0r1y3hnXFML 2ULR4pYZaOD7wY+O215B3j0GvwbSsAosVXre7GlkxXNwCwFYYJZPG2z5b+8vY/PjbTbf QfVJFPrA3vpEMmUczwSPL6GK5yyjXG6z/bRiVIAdY+F4T28NMg2qOVasstCkP54OeGvj d4pg== 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=vmxiajUirsBDl1M6sqXQnv4umdkdvmXO8tcQkVWhVto=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=eHuSSkqj7DzqXdfPjHXTpxHeUTE+K09SdLN58lK0LnO3p5y/4BeIZWRcMhE88oobns 8SnUvth+jKj8a/T25fN0duxNMQcBClt4N8TOG/5hkcrdiLr2OzFHCZW8YsvlI6VfksKz Rqrjg8hY8RcjeXCHJjZjPagjM5U1YIyKI0EUcpqC8WEVjdPT8+g0HmE8krlSE5xOB46s dH3R+uARG9P4T/q2fmdNQY6Kf40mx+ZZCC2irju5GJzgW75fmcMrhhxjhGhmddSnrDC1 NmPIZOCs3mtdpAuz8nO8p5pO1hjQBmJI0HG9zmGJzKabRZ6/v1l8noqW5p9IeQXuyFmu u4Xw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V1LRIars; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69607-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69607-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t8-20020ac85888000000b0042c0d9112cesi1242672qta.566.2024.02.16.17.03.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 17:03:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69607-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V1LRIars; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69607-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69607-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1EB241C21005 for ; Sat, 17 Feb 2024 01:03:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A29F2C1A9; Sat, 17 Feb 2024 00:58:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="V1LRIars" 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 4A2FB21100; Sat, 17 Feb 2024 00:58:49 +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=1708131529; cv=none; b=hlXFef9vtaGwaHb+MzVsLh4qGhp8uY8ebLN2PovHLzML85VPkbXBmfHyl5Cm+QG66YOmFUBorjZ6Hkt182uHuxPuEj38KsdOqfgZuuL68ShC0k7+efpujktK26hcRnel1c2WvJ7mX3Ji5k1tI2+Q8St6j+Ot0FXh85thKknMrWI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131529; c=relaxed/simple; bh=PHukevGUaPQZ0Um8hgVXJLMqOMYMR4EFewceSXfTR20=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=L4nTWxQXHhMxY7ywXPaJCC0lnFRFYNWYoa06puRvABJRvIRxsI5hu5q2u7IUhqW5e/cj7lTxYsBLOXXf11RXMJj6J8JHQLkWE3Evo01U+Nb18fVQcFfcQciJJnpdcm5XnKtrrt8pLPE43G6cRc91uo2yeRqnZKMObhvBrf27PPE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=V1LRIars; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E7F1C43390; Sat, 17 Feb 2024 00:58:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708131528; bh=PHukevGUaPQZ0Um8hgVXJLMqOMYMR4EFewceSXfTR20=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V1LRIarsi4JEdp5awudjc8ZjiK4TTDFQvBacB7HgvC9og6SplSDfSj8p9vx7Nj1vU MXt6mtUIt/A3GuCr60Kt4C+LT1P/BFtsSq+1sFP5SzhpblfgpDJHEx1coctwHfxF4Y 1aflAnUaAPr8y286nDAaC2Bx03T5qXXnXP06wYAtuL//9xKsm8/mbH/ZdM2H3zWRAm 4fW0ZDYAO0hI2FGOwq5MynjPnqmI6ulZsgjSumQuTmBN1vesW0pIRAvRFhu216FWyw w0N6B3qOo/dajkSf/2tCIL8phQRnHhfS9cwp+sb++optf0lUc91VHsTIbSMYg2mbVc vi47D6ILa3s6g== 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 3/5] Docs/mm/damon: move DAMON operation sets list from the usage to the design document Date: Fri, 16 Feb 2024 16:58:40 -0800 Message-Id: <20240217005842.87348-4-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240217005842.87348-1-sj@kernel.org> References: <20240217005842.87348-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: 1791106037800768439 X-GMAIL-MSGID: 1791106037800768439 The list of DAMON operation sets and their explanation, which may better to be on design document, is written on the usage document. Move the detail to design document and make the usage document only reference the design document. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 19 +++++++------------ Documentation/mm/damon/design.rst | 12 ++++++++++-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index 0335d584956b..be0924f47a42 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -180,19 +180,14 @@ In each context directory, two files (``avail_operations`` and ``operations``) and three directories (``monitoring_attrs``, ``targets``, and ``schemes``) exist. -DAMON supports multiple types of monitoring operations, including those for -virtual address space and the physical address space. You can get the list of -available monitoring operations set on the currently running kernel by reading +DAMON supports multiple types of :ref:`monitoring operations +`, including those for virtual address +space and the physical address space. You can get the list of available +monitoring operations set on the currently running kernel by reading ``avail_operations`` file. Based on the kernel configuration, the file will -list some or all of below keywords. - - - vaddr: Monitor virtual address spaces of specific processes - - fvaddr: Monitor fixed virtual address ranges - - paddr: Monitor the physical address space of the system - -Please refer to :ref:`regions sysfs directory ` for detailed -differences between the operations sets in terms of the monitoring target -regions. +list different available operation sets. Please refer to the :ref:`design +` for the list of all available operation sets and their +brief explanations. You can set and get what type of monitoring operations DAMON will use for the context by writing one of the keywords listed in ``avail_operations`` file and diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 9f16c4e62e72..6abf976dd71f 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -31,6 +31,8 @@ DAMON subsystem is configured with three layers including interfaces for the user space, on top of the core layer. +.. _damon_design_configurable_operations_set: + Configurable Operations Set --------------------------- @@ -63,6 +65,8 @@ modules that built on top of the core layer using the API, which can be easily used by the user space end users. +.. _damon_operations_set: + Operations Set Layer ==================== @@ -71,8 +75,12 @@ The monitoring operations are defined in two parts: 1. Identification of the monitoring target address range for the address space. 2. Access check of specific address range in the target space. -DAMON currently provides the implementations of the operations for the physical -and virtual address spaces. Below two subsections describe how those work. +DAMON currently provides below three operation sets. Below two subsections +describe how those work. + + - vaddr: Monitor virtual address spaces of specific processes + - fvaddr: Monitor fixed virtual address ranges + - paddr: Monitor the physical address space of the system VMA-based Target Address Range Construction From patchwork Sat Feb 17 00:58:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 202526 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp84337dyc; Fri, 16 Feb 2024 17:03:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWkWtuS9c6rIE+Fk3Ok0Se7mK6tkmD2vzqkikS925DemBAmPsDswj/ClaXdFH+a+sXxXPZL7me2ypkGV0UEtacPMflo2w== X-Google-Smtp-Source: AGHT+IFIvbT4y/hSWRlG87nRU8XS2dNRdh/SgB+UUOIZC+dM7OyStNhk6jkFKsKy2ilYKSHi4YYi X-Received: by 2002:a05:6e02:dd4:b0:365:2a4:ba5b with SMTP id l20-20020a056e020dd400b0036502a4ba5bmr4380347ilj.17.1708131830741; Fri, 16 Feb 2024 17:03:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708131830; cv=pass; d=google.com; s=arc-20160816; b=OWJYU4sCwLv39eBdU7er3BNCsXRnJwwC2DU88okIAGuGqWE0WfAr4pouGEjZwPK8uO EIZJLzDEju9FFQYnmA9DlUCe6il6lM9LjdWuX5G+8nXMv/RMOeJoEtwJtDHv6kvEUBjd BiaZ6C3ZM+B4IDFjf1HQoLGgCb7BQOVii8WXhyK45JY9e6bO/rcz2/bNX/9oC1ppi+Hf 9n0TXAm68EUSkoafqE6zftcX/fMYEIcl/Ol6wyx/6SEndaUARD9lhjWbDmRRNqTIH5Ka DAj+LI0iRR+TP5CEMrxfI1ioz6akKAMCU/qt2qJi37Auyst0DcDrHcT7NKrbb6uQ2WaJ rTpA== 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=8PWuhTpuCPgkgD8TID0mUqXK8MB9KE98oJma3+L3KHM=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=j3kQqe1J5CpU3IwiXBYc+BRouIeRkyFAfCHoctrm5+MWvaRF7Q8qOL2zT3ITO/+JrU olDU6tbKUdRSnR8b/AiIAk9wXdCOF5lYJ9IOI2YxssW76LvC6u0snerwHkkB/+BRFMhw YhW6AIxzoR9gsDsH1VwDTZtZjGt+rPaTASX8niyuQX3goX1ejTloh5FfV8fMj7UmHJZF Yx5tsxvOdQAhCsFCMhX/i6sbv8/RnrUkQIwYC+eLfCn6gdBds1/amS2b8X7Tspr2S21o f6DTQyGwQYfrw9yf81NC9nzzQFNzHtWfgWM7D2+T3hluiIWRsQD+Y250EpvolntU3GIa 0iQQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ISsyfP3Z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69608-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69608-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w30-20020a63af1e000000b005cdde899923si657247pge.758.2024.02.16.17.03.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 17:03:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69608-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ISsyfP3Z; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69608-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69608-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8C30928173D for ; Sat, 17 Feb 2024 01:03:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5105F2C68D; Sat, 17 Feb 2024 00:58:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ISsyfP3Z" 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 CBB1A241E1; Sat, 17 Feb 2024 00:58:49 +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=1708131529; cv=none; b=PXanwopSashG0LAWmRo6MQgganVST878wkgqCF3TEQ9r17xTypfXQQPdsmjbeyBLkp4bxwrmq4RVFKvkfcHSmyKtcPL8I51ajOMgOquTiX4WHQSSARB6wh4p5H+w/X3bx5IjCXGK5rFVFSe9kTyAdLMiSaVU+gMmBx0sSoUroaA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131529; c=relaxed/simple; bh=6n2FATexNcLId4djVWKHF9wa5NUBH9cgNCITDt2Fr18=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kH4ayuRYfUhlJXvfdM0MBVAe2ij7dBBw/ij/+YtESxwhaaVaGv/dOvCZS+A9n41JKYQw65UVjtKMveCBfgsY0s48wLJ7ZB8yDbRKWX7AgpuJFhctEUsVr8/IzTxOMmrZtzwhS7Rh5tez7tXVjClfUuX67IdU8JAjUdfkT9Q9RxY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ISsyfP3Z; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00CB8C433F1; Sat, 17 Feb 2024 00:58:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708131529; bh=6n2FATexNcLId4djVWKHF9wa5NUBH9cgNCITDt2Fr18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ISsyfP3ZrwLmaMw1RafF3JsD6d33RuEvcLcbAEmduwXDR9M2kuhUQTy9tz9cN7tTz NDeLa3meDWtsWp9y5+LB/9snyNbOChBxsbAKgTHiUQQyw4KeuVlYNhzGrX9uRpIS6x p/rhICMyyMBvQi+QYZMOESAHbv6fCQ+rQg1OwiPV4fneYCcCi6QM8vMhAeyCzBzCKR ekGrLzkmFRU6AekKPY9dToMotM6+gIEbLim4OOw7olVO397RqeIlqxXnMqOrc/iQtq ZG1CsALtnmtEPzB490JOvu11WJrILRoOW3W7aGazKv0zLOKUClugFBU3Ejeue9tFem Bf0eNvc+wkDuQ== 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 4/5] Docs/mm/damon: move monitoring target regions setup detail from the usage to the design document Date: Fri, 16 Feb 2024 16:58:41 -0800 Message-Id: <20240217005842.87348-5-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240217005842.87348-1-sj@kernel.org> References: <20240217005842.87348-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: 1791106042241331264 X-GMAIL-MSGID: 1791106042241331264 Design doc is aimed to have all concept level details, while the usage doc is focused on only how the features can be used. Some details about monitoring target regions construction is on the usage doc. Move the details about the monitoring target regions construction differences for DAMON operations set from the usage to the design doc. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 16 +++++----------- Documentation/mm/damon/design.rst | 12 +++++++++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index be0924f47a42..fefe62e0a466 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -242,17 +242,11 @@ process to the ``pid_target`` file. targets//regions ------------------- -When ``vaddr`` monitoring operations set is being used (``vaddr`` is written to -the ``contexts//operations`` file), DAMON automatically sets and updates the -monitoring target regions so that entire memory mappings of target processes -can be covered. However, users could want to set the initial monitoring region -to specific address ranges. - -In contrast, DAMON do not automatically sets and updates the monitoring target -regions when ``fvaddr`` or ``paddr`` monitoring operations sets are being used -(``fvaddr`` or ``paddr`` have written to the ``contexts//operations``). -Therefore, users should set the monitoring target regions by themselves in the -cases. +In case of ``fvaddr`` or ``paddr`` monitoring operations sets, users are +required to set the monitoring target address ranges. In case of ``vaddr`` +operations set, it is not mandatory, but users can optionally set the initial +monitoring region to specific address ranges. Please refer to the :ref:`design +` for more details. For such cases, users can explicitly set the initial monitoring target regions as they want, by writing proper values to the files under this directory. diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 6abf976dd71f..2bd0c203dcfb 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -83,12 +83,18 @@ describe how those work. - paddr: Monitor the physical address space of the system + .. _damon_design_vaddr_target_regions_construction: + VMA-based Target Address Range Construction ------------------------------------------- -This is only for the virtual address space monitoring operations -implementation. That for the physical address space simply asks users to -manually set the monitoring target address ranges. +A mechanism of ``vaddr`` DAMON operations set that automatically initializes +and updates the monitoring target address regions so that entire memory +mappings of the target processes can be covered. + +This mechanism is only for the ``vaddr`` operations set. In cases of +``fvaddr`` and ``paddr`` operation sets, users are asked to manually set the +monitoring target address ranges. Only small parts in the super-huge virtual address space of the processes are mapped to the physical memory and accessed. Thus, tracking the unmapped From patchwork Sat Feb 17 00:58:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 202527 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp84472dyc; Fri, 16 Feb 2024 17:04:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVEI4TUjXKLrMIwaXv6i6J44+/vd3M1+BplKijo2trmquxhpoK+DdvDDFL26XbkC1XgTCBOUMK33x+mXWGkcuQ4k9VdYw== X-Google-Smtp-Source: AGHT+IGoNcuOW9ps1Txubf3s9R894CuNnSOjSzSUk8RVVgMOxL6wSwUkALK7EF9I+lS/OXtShPFx X-Received: by 2002:a0c:df04:0:b0:68f:2d89:dfb with SMTP id g4-20020a0cdf04000000b0068f2d890dfbmr7908575qvl.27.1708131844823; Fri, 16 Feb 2024 17:04:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708131844; cv=pass; d=google.com; s=arc-20160816; b=irJzfh/v1qFofV6ujZ0p4vxhrlxLah4qu7ZOeYd6q0zg4ac9efWgoIOFBelWmIA2AJ bT+wc+8lxyIEAqEPp2N+cu8xgZDuLAAbifVQP5Zup5E/I/LBDjynrcG2G8kitVRjhWum ASF3cNa1fqBPNDESfnjes/eSJX2MQfbT1b6RbRYjvbfg4hiAXzdjmWa+3Q1d3zRBkCPA O+cmDRN/S83U5Nd+S4e7Ps+C1nFDMl2o7WYO9DbvwYkHADjSaI63Br3ixXcB841nCzf6 J6NKYmSqFuouWMmMHRRxq0LaVIMhEzeOXR3HTVhhd1moCvNoziKubsu91xUy891KWeQm K5Jg== 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=YoHlLRZa70cDva0swQmietSnhunN8Y6JL240OM9dUhc=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=gFytd86n3aHW6B3x543v0T+2gWvnuQOHsqayI+QdR8UFew9M6w71jOU8KQRn29D/+t qh5aqT0KhrXXzC54YRl6MQhRffzV00PBiwt9yGhORGKEoJNix/7du/a2XljylvhvvIEs xP4WA7SjQWBh1XxpD3W0FOPKQNytaKz+7bVXHrx3bHUWfmtibuuYA2PN2ovilwhh4P5L atNwanU3zE8Cgm8evdkYPsnVK6jBrH3ZXpRaU5sOVCjPCDVaTXlXn3bVb8Ep124i/l0V H0JAptCfOWSDlMzckjtRMjmUop4s4miJAL0/PsilsYmsx0HjTuTNrcg91n4qrNUziE46 bwgA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K4bEzdFL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69609-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69609-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r12-20020ad4576c000000b0068f13883818si979971qvx.279.2024.02.16.17.04.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 17:04:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69609-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K4bEzdFL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69609-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69609-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 98F201C20E60 for ; Sat, 17 Feb 2024 01:04:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 130A91B80F; Sat, 17 Feb 2024 00:58:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K4bEzdFL" 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 C743E25571; Sat, 17 Feb 2024 00:58:50 +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=1708131530; cv=none; b=hLhf7+B4KmkP7XlaskecnCQ7zGbjgRHYebJRUgb2B2yFtf6NmZfxzjhfXCk8CtH2jRTisLEqCM4D7W7NfhWqzM5bzCGH+2LhnNkwxP75B86djTfK/fCkU1obBIheD/7NXc5AA3iv8kY85R09VwMfCDhslkPZ5GL1bi7qofDIrGg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131530; c=relaxed/simple; bh=zjtUmDw2W04Oqswzi7ugwTbYsUfBySmq7qQ57D2h3/g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nFNLGfHvYCPmJlOA6TKoRRPT/XFPPBXDgS30guUgX2kIKpqKmM8WHVDanE+XJ4hZQNz7qZOgVtCEk/Ii0pp57+sEK/f76jM/6Xq5QndpFtAMsKO1GApmCZrSiePBCzfNfw1FWcr1WloNjYEPw/lJ3f8u5gDOCE+zUIhJFLdBKdg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K4bEzdFL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5D15C3277B; Sat, 17 Feb 2024 00:58:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708131530; bh=zjtUmDw2W04Oqswzi7ugwTbYsUfBySmq7qQ57D2h3/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K4bEzdFLDlF6NLqwGK/mAAgfMMKWdnJ8vklpKYAdUXCed+fMo4jl0CvKX/mU2OAFn arCqEtlWyJt5NSpJVt1S0W0F4hksykL5ZFvZ9d4n7IYMnUQy46xVjZ95hKG5qtazQ9 mqzObWI8j5FId7H/EaphvGBxODbmk1E3N9bOTqyw/OBjE81il5DUZ23VvjMN7QpFMZ UETBSwIEX9MS9V6yCtXvWn6r5ldcHWnQDixxgZ5jQ05micq0XxuvRz3M937Ftlb84H 4vrksfLUmh2xuqU/SyQmUsE1zjA404Sathszb2uCr6DW5kSIhXCXtRyCO9viVxCqjp gigOIuoHt+lPg== 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 5/5] Docs/admin-guide/mm/damon/usage: fix wrong quotas diabling condition Date: Fri, 16 Feb 2024 16:58:42 -0800 Message-Id: <20240217005842.87348-6-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240217005842.87348-1-sj@kernel.org> References: <20240217005842.87348-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: 1791106057429031640 X-GMAIL-MSGID: 1791106057429031640 After the introduction of DAMOS quotas, DAMOS quotas is not disabled if both size and time quotas are zero but the quota goal is set. The new rule is also applied to DAMON sysfs interface, but the usage doc is not updated. Update it. Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst index fefe62e0a466..db6620b5bc0a 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -329,7 +329,8 @@ 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. +quota limits unless at least one :ref:`goal ` is +set. Under ``weights`` directory, three files (``sz_permil``, ``nr_accesses_permil``, and ``age_permil``) exist.