From patchwork Thu May 25 21:43:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13255700 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 35462C7EE31 for ; Thu, 25 May 2023 21:43:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E1A2D900005; Thu, 25 May 2023 17:43:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D7CAD900002; Thu, 25 May 2023 17:43:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C4713900005; Thu, 25 May 2023 17:43:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A4CC1900002 for ; Thu, 25 May 2023 17:43:28 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 99AC9120599 for ; Thu, 25 May 2023 21:43:27 +0000 (UTC) X-FDA: 80830104054.17.EFDB7D4 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf20.hostedemail.com (Postfix) with ESMTP id E41031C0012 for ; Thu, 25 May 2023 21:43:25 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Sm66ncKT; spf=pass (imf20.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=1685051006; 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=KqRxbCs+J27XJMw5KzsHVElKU/myUVwjo5O0H/2W2W0=; b=wScjKzYhclf1dLSAqieNAplosxkujgHVTEN3nDo2Cgedgp6G+uh8jJc2WpJl5dvOZT38Qc wFSzJ1xTrZVJ7KiGqDhE+BAEJHo6UXz4SyEmu5etQkeCWauLtpSZMsr0Q66fkVkEhhyDnz TGCn+YthEYd4S4SW1kqNZXZR8PQP6Vw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685051006; a=rsa-sha256; cv=none; b=4BnkTOtclJknnS72x5bHfTymhGmlswDfSmOuSMKDelRxWzc0osngp9Gsso6tJAV5lrcLeG HxXCtE9J/Zt87d9Tr4BVoTYNp3rFS9TM28Gi1g0o0qo5aM6zygPf+m9tmvLk0BEMNNgfmV a2E9xVhTq+mIvXkLy0bipeRgU1wqkb8= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Sm66ncKT; spf=pass (imf20.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 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0DD5064B74; Thu, 25 May 2023 21:43:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FC00C433EF; Thu, 25 May 2023 21:43:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685051004; bh=GDYnOCmR9taeLPi11qkRjJOP5JKJ+SKnVQLPWS9novo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sm66ncKTjd+QyK0/mKdZ2zUyUEX/24G5aM3/NnaMM53ZqmMolOjDQdXnpxWvXkPrZ xVdPCE2X+IQA/H5pnFnmzbre0Yi4CuEg6MvoI1KuC4N/YdmtpKGqDH54/x9qKPRBl2 C3aiKztWzNc62p9d9ceWUBmoiZbFZHmt+kQ3Z2qhmL0zkZbtm9SV+DewauTDlp7SL4 sIKnTVcDThUbT2aFIP+9Mi2A5QLIPCcKLz2fyJs/mxe/XkVozkH77Xf8NZ8VZRUF13 Zik9/tM+ygV+5FwhARYsu/xmcOjgGc0MA0bPW5scFNE4SBfH+y+vaIjdtUPz9bF+Q8 6iD6bMZ2wuNFA== 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 04/10] Docs/mm/damon/design: update the layout based on the layers Date: Thu, 25 May 2023 21:43:08 +0000 Message-Id: <20230525214314.5204-5-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230525214314.5204-1-sj@kernel.org> References: <20230525214314.5204-1-sj@kernel.org> MIME-Version: 1.0 X-Stat-Signature: eai3tywpw35kcnbn11udxwgudau9fsmp X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: E41031C0012 X-Rspam-User: X-HE-Tag: 1685051005-208435 X-HE-Meta: U2FsdGVkX19WLG5XSg/axF9NSYmazew48gSxz4kLkYFeyN/OYG++dBeDWJ3Cd+RUplOlGQrGESm8A7qALENVmO/VcM/WkSK4of+/cpBi9sAGpFwkvYrWSrk+MCTMPwVry49mMA0YgoEIFPwz6tw3TVY/Pxmo/5FPVMdTD8HxNE2Ur0OyYsForBxh/eHNuvdKotWFGx9W/nJY9E8AT7F19LukJ6sOwLVIohl8cpDM/WYKRWHlvnHWcsSmsL4/KzgHUn5OWC+a3yKOb4dnz4++rPCsJ7pCE+TCP9NOJ4CdZP/P/SyjmWcy5UnS+bYb0aJ0lVfML8nh5GH8m1Ty+4/FiBce39gX4ch18n4vdw9oiLTc1qzIh7o0ch1e4tQK2EszVl4dSk8ABUBQHcFyUaY3kkLlXSFzNYzMq5ZFxCw7dDXpwotDa4ThqfcjNuTv9LIg7wzN11EWwVFnPUTnZjSZdVfV0mHQAtNv5yWn1qzOmVFjvlDGx4lseHAb1m3SAg3yLkQcztbeMTeSA8qsSKP2MjBNdGnqqFcmH0z8MmKnA3H5S3g+b6VOcmSioToi29E1jdONIhDK03ha6jik+fOAm8TPi9p2Kie1H2AACbPS0SJSkLDydylvqhdMXN7wFbR/F5YIlrm4zn/Us8giPvg31+tCO2kZxTcdRWAwirip5TIzZ+Bc/UwlIfkqJ4RnF9J7xAips1HX3NkvkxDHVRNb77OvzbbvIR9GbJP3TDYL43m5xIpLVFQ6bOdYnsiRNkp2KYiRAgoqFYSiGbREBkA/E0HppzCeFeM9DE9YZixiuQeysGyPxKapDsPHW1XP2c/50B56Ieb2/mdE2mIJhkkHiq0PT2sdI7M05jiEimVm5zabi2IbbirTUnysWhZNmejJwmGoT8R00UooxM+iaWjrGXK/dwcE+bjtTSEZJcWhQVeXfyJcRxv+1l64ANXJpP3pAq9lMcXcAKmIqwScKIo NSaafmrT Kz719NTIG8VCrduBB6s5PB+DMsfKw/njv03Wkc1o2/odZQWpiHfpWlgIhpfxGEZRf/znW6/b36ppnyh8sXnlW4WBYgsMHF8rqsSTWDRHcWuDXrqHADIswls4yOiSeffZNIHcq2SgkjhScZCvo9ghHFF/U6ETg/wNpW+CqCUxEEXhYKuQj8mOm2GLxXbTDnI33NajQe0Cey2oerFZgeoV4SkRYdVI8008kBRcayweNsp9nS7p7oPD/ihAwCwBw/260rhOSpHbaZhYjyi/uggvxAVmaJ6cloEM/Dp/ZLKQxYJFqaZF3b1imcdJ4rvJStrfendCWRDIjikM3KIbOG41GcdNjaQ== 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: DAMON design document is describing only the operations set layer and monitoring part of the core logic. Update the layout based on the DAMON's layers, so that more parts of DAMON including DAMOS core logic and DAMON modules can easily be added. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 3b4ce873fa71..eaf52f3a9144 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -19,8 +19,8 @@ DAMON subsystem is configured with three layers including interfaces for the user space, on top of the core layer. -Configurable Layers -=================== +Configurable Operations Set +--------------------------- DAMON provides data access monitoring functionality while making the accuracy and the overhead controllable. The fundamental access monitorings require @@ -42,8 +42,8 @@ Also, if some architectures or devices support special optimized access check primitives, those will be easily configurable. -Reference Implementations of Address Space Specific Monitoring Operations -========================================================================= +Operations Set Layer +==================== The monitoring operations are defined in two parts: @@ -105,8 +105,12 @@ conflict with the reclaim logic using ``PG_idle`` and ``PG_young`` page flags, as Idle page tracking does. -Address Space Independent Core Mechanisms -========================================= +Core Logics +=========== + + +Monitoring +---------- Below four sections describe each of the DAMON core mechanisms and the five monitoring attributes, ``sampling interval``, ``aggregation interval``, @@ -115,7 +119,7 @@ regions``. Access Frequency Monitoring ---------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~ The output of DAMON says what pages are how frequently accessed for a given duration. The resolution of the access frequency is controlled by setting @@ -142,7 +146,7 @@ size of the target workload grows. Region Based Sampling ---------------------- +~~~~~~~~~~~~~~~~~~~~~ To avoid the unbounded increase of the overhead, DAMON groups adjacent pages that assumed to have the same access frequencies into a region. As long as the @@ -159,7 +163,7 @@ assumption is not guaranteed. Adaptive Regions Adjustment ---------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~ Even somehow the initial monitoring target regions are well constructed to fulfill the assumption (pages in same region have similar access frequencies), @@ -178,7 +182,7 @@ keeping the bounds users set for their trade-off. Dynamic Target Space Updates Handling -------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The monitoring target address range could dynamically changed. For example, virtual memory could be dynamically mapped and unmapped. Physical memory could