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: 99229 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp77053vqr; Thu, 25 May 2023 15:13:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ66hEUf0WoPaQo4xMYOpCoQQt/MkREP7JMfi8zxPr7KQfiCP4TmnEtuIYjoR5yR/1WYaQXM X-Received: by 2002:a17:90a:bb89:b0:24e:3c23:9654 with SMTP id v9-20020a17090abb8900b0024e3c239654mr66342pjr.44.1685052828517; Thu, 25 May 2023 15:13:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685052828; cv=none; d=google.com; s=arc-20160816; b=qajs6865H9d5viMJHqI61Baao4ih5NBtEvGcg9FdobZ+J2DPOKEVgS8nK8B4+jK0qa wG2XRrIiaK/vSj0eLxx4oDFACgJoAvAq0p/8q2BPtKW626ZZ0BrsCTuTO/uySMHTG8dG aJ3duPmFl8t2pkRtKG8v0u3G6FT+jseCCRkzQR13wyOMYUM2KlV6mwhPrI8aUzDN3QqH ZSI6IjyedllYs9W2PW/otAasBvoQ/F4rsFJUaEC+MqTP1DFqKYPigIxX0DOAArbTp83X c0P3TyUMzXMbwmbDcksnIwmoxuz5uJrihaA5OCFTbtSIxBZHbfV9W3z3bOdTTw+uosCZ 5AHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KqRxbCs+J27XJMw5KzsHVElKU/myUVwjo5O0H/2W2W0=; b=SQi5lx9KJdRv7nTrw6om5YdeBtmAMo6n5Z4DdVsp4oOXeeM2MGJqP0qa16kVIoxdRN MUI2oq2468o+L8o1v0RyHXrPSkNGEeKyGDOEKEHMWVJXvXp8+HEh2XsigyX9dWSwMota THpnI419vzws7KKpVX1encjIFnXB6WvQuDMTI7P3O/t6dJvjja00URRIP+NCQaRvjDbu ZOkKBaq7YTzTT8Bwac1EN/PR47hFC8oawNakaElTRV1fEaxBBHyPna1IGwc5CPK3uwAf WATNqUKeGT/njfXsUse8aEREDownuy1Ssj83j8jpWz2nUrydCYttbTXx/m7q1WiU6eN3 nmvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sm66ncKT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p24-20020a17090b011800b002448f1b24d5si3487148pjz.139.2023.05.25.15.13.34; Thu, 25 May 2023 15:13:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sm66ncKT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241969AbjEYVnh (ORCPT + 99 others); Thu, 25 May 2023 17:43:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241915AbjEYVn0 (ORCPT ); Thu, 25 May 2023 17:43:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA0BA12C; Thu, 25 May 2023 14:43:24 -0700 (PDT) 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 8B91464B75; Thu, 25 May 2023 21:43:24 +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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766905954469473258?= X-GMAIL-MSGID: =?utf-8?q?1766905954469473258?= 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