From patchwork Wed Dec 13 19:03:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 178266 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8003771dys; Wed, 13 Dec 2023 11:04:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IFgkum0kjiizKspNdAxZnLLfG2ljNvuwiGtSmrZ4Hop1ftND5Fa4vMSU5EOADK1nRDfRaHm X-Received: by 2002:a17:902:ec92:b0:1d0:b013:229 with SMTP id x18-20020a170902ec9200b001d0b0130229mr5462904plg.23.1702494264322; Wed, 13 Dec 2023 11:04:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702494264; cv=none; d=google.com; s=arc-20160816; b=yMiyHCed1OM1yVpovdS2DKR6unEcfd7+H2Hbe5vE16kTDpkTiv7L059rRo3sABF0IF cWmPwWqJ1A7pZOUKb0n6wuKZTbxjpbmYyx72IJNeqayjpnqjmzM6YUoKjntmWDF3/Rt2 h/kNmCsqqvAqRBKmMJBs0QTTl5F7516p8uPigw4wjM3cv5p3Ht5Dfpw5b6t2D2M2ANfA myUJPf4ozn8QB2wJi6j7U4iVwgjhGpy9YD8GjukBZKMu5tQ2XlWCu6FzSMMwEj2isg5A daCjoDFaarGUAeqvye2clXWd52/4ePh7s9tXEVb05Od+y8/WQXTon9gpmxJBG8Kq1Jep ca7g== 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=/JpHE1Fbo0I1s3wjHDCA/SuT9Y2KeovIqrYikHaS9VQ=; fh=jKijsxc1Z2CHKVFf4S4lB42jMLcn6gTpewOn4Tq1/VM=; b=KaZ/t0G5a/29XvQaZD+BXl89ldDcQIN1UcQv+Fk1soOu5IzyG7r0qwQVKwEPM30/d/ R5ODBTRdDvuz29i2S9jr7XrBLSY2Pmy4eZGqaVusA7m17mKBVAJzBIg4pLGIzst49VbI Z3PqHYTjD/xdN8FhhZC3u6+v2ntEklbDPHNQIDDyP2tQQmaC9/qQ+IeZYdG8BoXS3SQG YLNCs+wh6dJ7NpjqOtvfr2cPTT8eqwmz4OM7l6pal0y35Dc194iHZAq9cvVEy5isVCjI hHrZpTm0/ar7rCHVLG/bO9NGEBH+1y0u7qDyC3M5debKW3VM0IQyMTcwJJLTNrhh2ooL bUvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hyr+2MY6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id b12-20020a170902650c00b001cfe02fa89esi9900551plk.117.2023.12.13.11.04.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 11:04:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hyr+2MY6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 1AEB9826EDBF; Wed, 13 Dec 2023 11:04:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442035AbjLMTDr (ORCPT + 99 others); Wed, 13 Dec 2023 14:03:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235444AbjLMTDo (ORCPT ); Wed, 13 Dec 2023 14:03:44 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CD1BE3 for ; Wed, 13 Dec 2023 11:03:51 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BFAEC433C9; Wed, 13 Dec 2023 19:03:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702494230; bh=DCzjM8ciFmSW1ZwCtCZzL7l/QtzSRPhWneY+wKj+vU0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hyr+2MY6xPiuvWwHsyk6RV0Torov76tR6btlHqK49UggV0nEVIZ7ovqJ6MqiyQoBT GJ6ggkCUIcocYQhX+C89P+Vh9n1X1PnrDZs1fw0/7mW6bDPCgI8S6xipNOcslhVGmf OFrxcOB7yW+r6aoNVwiKd6TxmCRcFJdJN6sC2uhEVPUbFUSqM/8TKyhIA/VF2kSaJM byTvwbOaaFViPxmxVRJISegjpfBKtMo0iUh7T10NR3wVO+1YRpxRMcSv3FINCQEFxC w2Y77OA4sFv5hwpDOHF64Drm8gPpHk4VToAgobXt0zKgYIKbhnxYA9yC2GCMeSeSXg sbt3PYCKBjPoA== 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/6] Docs/mm/damon/design: place execution model and data structures at the beginning Date: Wed, 13 Dec 2023 19:03:35 +0000 Message-Id: <20231213190338.54146-4-sj@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231213190338.54146-1-sj@kernel.org> References: <20231213190338.54146-1-sj@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 13 Dec 2023 11:04:19 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785194625521172883 X-GMAIL-MSGID: 1785194625521172883 The execution model and data structures section at the end of the design document is briefly explaining how DAMON works overall. Knowing that first may help better drawing the overall picture. It may also help better understanding following detailed sections. Move it to the beginning of the document. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 8b4a49ac057d..1bb69524a62e 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -5,6 +5,18 @@ Design ====== +.. _damon_design_execution_model_and_data_structures: + +Execution Model and Data Structures +=================================== + +The monitoring-related information including the monitoring request +specification and DAMON-based operation schemes are stored in a data structure +called DAMON ``context``. DAMON executes each context with a kernel thread +called ``kdamond``. Multiple kdamonds could run in parallel, for different +types of monitoring. + + Overall Architecture ==================== @@ -490,15 +502,3 @@ modules for proactive reclamation and LRU lists manipulation are provided. For more detail, please read the usage documents for those (:doc:`/admin-guide/mm/damon/reclaim` and :doc:`/admin-guide/mm/damon/lru_sort`). - - -.. _damon_design_execution_model_and_data_structures: - -Execution Model and Data Structures -=================================== - -The monitoring-related information including the monitoring request -specification and DAMON-based operation schemes are stored in a data structure -called DAMON ``context``. DAMON executes each context with a kernel thread -called ``kdamond``. Multiple kdamonds could run in parallel, for different -types of monitoring.