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: 13561141 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 1B4A5C48260 for ; Sat, 17 Feb 2024 00:58:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D4D9D6B008A; Fri, 16 Feb 2024 19:58:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CD3B26B008C; Fri, 16 Feb 2024 19:58:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BC4026B0092; Fri, 16 Feb 2024 19:58:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id AD1666B008A for ; Fri, 16 Feb 2024 19:58:52 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 83BEE14011C for ; Sat, 17 Feb 2024 00:58:52 +0000 (UTC) X-FDA: 81799486104.24.7781AE1 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf28.hostedemail.com (Postfix) with ESMTP id CFF17C0010 for ; Sat, 17 Feb 2024 00:58:50 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ISsyfP3Z; spf=pass (imf28.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708131530; a=rsa-sha256; cv=none; b=tIxOOEKOGUkKqpLbXlwgRRHJpx9HneZtXnRJCIPuV8V8Ehz486fqeMcBiqZFK9+PWtUB75 p9mow2T6ys/OJzD7Xw/YtE5hpX2y/sRChO2uKQF5HUnJDGV1mvGUp9cx5o7yjUsTjFPmCY 2JGbXkCFh68jgWsaAad4FrZ3SGM1HtA= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ISsyfP3Z; spf=pass (imf28.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708131530; 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=8PWuhTpuCPgkgD8TID0mUqXK8MB9KE98oJma3+L3KHM=; b=1hgdsQxifiWlW2cRHkR5mpe+V/DRomvuQGah6uJqmiBtKhWwiq0rzLoaYOVaISmG7ojlao 8OLeMgkyq/oY15VcvbFXB8G3rG0Az/HCr+m44huka3sZqNAsTHDz63Kw5GZ7Yw3Hrl63pF kBX0XiW+frL03IPiXgodzRurueDKdDw= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id DEBAD62112; Sat, 17 Feb 2024 00:58:49 +0000 (UTC) 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> MIME-Version: 1.0 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: CFF17C0010 X-Stat-Signature: 7sqb6fb48yb1my365qxpm4qdfxks7t6u X-Rspam-User: X-HE-Tag: 1708131530-125607 X-HE-Meta: U2FsdGVkX1+ydIOj5VhV9iTJjRrptmCBR863nxiDYrj5z3mnZLmpsDErBhP6aGVy+3pfxO6rIIHsjpLZwb0exjfQsnogyMa7i6UvCRCQdTE+7fCMVQEcSKaxrjXsxYdYX+EcJGsaHQsQecamLVZXqstddKATsp1A+V7gOTNS5I0OJKJiiA2uJBfGhVzc/mcc9bPPUasyaGj3wMVSrjIJRrHlCpQ+0DKhtIX/3XsWomx8iqW7x121KI0jNuihijmWRw+akOOqDaKntI4e7vf45YBaNOqDIPPw8VUDauGqwdOgpwQ8hpgH/OEuZAq4ahePNyee7EtQWcc1Cl/XxCb2nz7BXU2lBXvVSlHGfpt6PbgNfcoGxmzd9d2Ufani60BfoabMj51ewycygr/cyR04bQI6bwA0ORLGDFGdTvfYJN5Hf2mbfSDW3HsGHQHtMVr9gzYxQxMrtinp+Juc9Dn78G7a+63ShjopXOd+THBbs4CuF572mlRYrFrnHc78IZiJg1SCLumTy9vgeoSsD4Jx8C8/fTSFLJ61ApwVmYOBUeztZsgpSnBxMnnWEsNzJ9nXFyBF1771Jq69J2hSg1aDOSmMQtoj35z29jdmPQUJDEb5A+70kEoMYiivp0QeTSu+DOKcPHN1ZLulIgHS2KQ8h++8RY+do/GxeExizmaCRb4N76IvZuuo+6DK/ugOpHclpEl9NyZziyZCRAWjkthxfrlG9n8FufBHBRCOuZoN0/x6GsHV/u+FaDwmVqaBtw5CixN9bRNiBAL6fW+fYgPCeVhATnMueqIcApiNgdFkm761Aiou2QKDNnCfXWaymDviA5hw9S7qj4/BfxnE31OsUfrFixu2XH99EUQklndufwXEpu4flzNezBceFfGXcOn833pCsT4mQxb57wot/HWU3u3BBBygxdS2BDbKgMa2XDIcM9sfbZYJi3l+2IuURNEgYVTUDgwdUg4h4/Eo1NP cjGjQX9j BfvJp9NibpSc1XlSAoawHUuwU4BdXTcJeC7tLubVbhqf1Bb1Nz8X9ucDAwSCx+ZnIVkb0pPLKcOIdDbrZ2m/oxwrhK5Wr3K5QV2sQnJiLroh9YBJZPwkW3WX+bGxhHvhF3GJ/EBnrMwyCOAVeJOMYCtv2SBU9393YZ33hqliNwK2aKsnu2h2TtJMD5z5hQPZjTbWI2Wusf1kAz4hLvUfga6x/6X+OhTrmJVvZQu3iYNEazy5DRmlCcDq0nH/UQ0LY49S0BgrGh8SRPWA= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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