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: 13491784 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 9D9A0C4167D for ; Wed, 13 Dec 2023 19:03:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2071F8D0051; Wed, 13 Dec 2023 14:03:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1997E8D0052; Wed, 13 Dec 2023 14:03:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 013028D0051; Wed, 13 Dec 2023 14:03:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id DEB978D0049 for ; Wed, 13 Dec 2023 14:03:55 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id C01BBA196B for ; Wed, 13 Dec 2023 19:03:55 +0000 (UTC) X-FDA: 81562719630.03.96052FD Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf26.hostedemail.com (Postfix) with ESMTP id 731A3140013 for ; Wed, 13 Dec 2023 19:03:52 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Hyr+2MY6; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf26.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702494232; a=rsa-sha256; cv=none; b=3xEN9MpDaC8Q2ReOdh7oJwzf2ce8bBwiF65S27+nMuTaldd4FrSwkF3w3kUyZMdDkANwff qNwVdkWtPo/BlQta19KK3EJKvICM2COpzao3FayGxTy6CUUrKdhymB2iUMhzuuWCT41sVj yG0tLfFAeIxNWHB2+foFJHXAq1KGiSI= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Hyr+2MY6; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf26.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702494232; 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=/JpHE1Fbo0I1s3wjHDCA/SuT9Y2KeovIqrYikHaS9VQ=; b=yvl/Yscqr+y+G0H7HbIyYI8v80fWr4Hu+hr/pDUfvt/EBAShvhkHCPBOPEUQhvyvM11THT zZtrSaBTnH6hA943xClsFdlFMtWDnrSGc71OPZNJXBncgreya/hzXIOtmDkyUDVMs6FFvt LdnEktF1kMBJ7dOiQKnpSAlfCGscV5k= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 05902B81F21; Wed, 13 Dec 2023 19:03:51 +0000 (UTC) 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-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 731A3140013 X-Stat-Signature: zd1iy1166erqi43jifpf919pjrpso1ow X-HE-Tag: 1702494232-251481 X-HE-Meta: U2FsdGVkX19CTHt9c4TgUx2VL7q59tYbwsYEokMOkx4mxVtro2X3xD+Pucg/S80/5Ww7cc5mULF97OUP/5/0hajQGiGOGrnduLw4vskgomhX5khNo3r/d5muBf2+rDqRc+8QKQkZlHlPllL1oR8I+/34uTAPutbO39x3i//DgkXoOMOoGuER/AlRi0srUWRt6ZxE4KBwlje0AotfAJsZAEZC4xE+odaLnVFwpwatr5VYBtsw9QKQh19JA3D4/az6tDMsiar/ah4Gow4gDia72Xmz2V0ipT4/PW9Ky3wtYnSyk77lQEiUqObxJug1feI1pvFHko5IBbyNmvrAEqQT2aEexd7i/LkbWg279zVhmX+PAFS4LlVi12k6ja069ndnCMr5nY1klKBLPiZKzJYnBVp+yiIQJlH57p4MfE3JqI+OFRIq+5Q4Ptw0VsksOicZqaF7hFSntbEuRWTl5Lcn4FCbRySc22cODiMhSt/q70BLa0zorgXW2ERWkqT1+ylXUAfxs10h2NzuEk3fsyVhMC3nHtKJafO6DcL+bce2tg/N6cgbkAWIxVO/Ncv5u5R9x48OsdUNzOeyMrJ8lbxNwTTL1Pg4AWCkFmy9Rjdq1zA+LWUaBrNyOzx2QeFal9THY7MIxUMvpD9d6fD2cSQzPnMSXN9/g/hSzVrbpo7ci1MnclaYEONgwj+AafjJWttKal1q6IAt4eYSLsO1ZOXdC0jApt/Q1TdN4bkj4gS2e3NajcB8d8PQXGNI06kKT/PwUOiNc4gbYaurbXgYSMYWa9dcMhmtKs+IWe9XEjA8Pu4rKzNf63qbnnS2jCgIWq4M4TJ+P658Q2yfRulvo7Pk2JH/FuZIBhzHtI1xa1GemL66LD/OuY4PqhVASYHTyqxXUGNXOBJNF4SRNLC3l+yFJk22veFmsvSyc+BuK7RIgexOt66L0vZR4giOQEkKXKoJDT9LUvDjBHzlzI4VE1s 18AnjFnv 4m6nKA0cV6BhjhHO4aybLaoU7Uv4mAZp+h5Re9svx314oOlS1ncsbrzjDpUy1ejiLlh/jlg3mf0i8HOsqfZmbQXP7ZGY2KVls65+L0EkTsgQtjpf3tzqOGuKapxcSTI+b9rdbCpc0INzmBTMn083CXE/5oy4dKPvGJKGro5XdmM2ugES5DEzRlU6MK7weSZ2gyLzXppxFRyf2i+lUbhDiDbA4eQYz629bzVbDuZugc/5FruM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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.