From patchwork Thu May 25 21:43:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 99231 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp77095vqr; Thu, 25 May 2023 15:13:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4vhiH/pKU4DzG7upFTTagLrOUs+W07+Il06BuS8EW4gr2SLWdyQbFWLhpcpaC+15HGQcfb X-Received: by 2002:a17:90a:2d8e:b0:24e:1a7:eee6 with SMTP id p14-20020a17090a2d8e00b0024e01a7eee6mr51357pjd.45.1685052831989; Thu, 25 May 2023 15:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685052831; cv=none; d=google.com; s=arc-20160816; b=gywpsg54o7RMhw0Ljf8UZMMLuiUylplxHRCiuehWPHJ4yK1LhwgnIpwt2sKj5jEhRP +envmtCkFcM3dokSQopXfCubZ3SJxMMMeGRnSSn8er+THP4+dfqk42Etf78gmaQe8UoA A2am+NewisEQhh/aLWvwqAAxyysoFzU2EssgpBYCCIg7pGnj8unXH5o944X+ZUSL4AT9 5rrBcnqwXURCb13VKfnsneLRbZN+nJgp+TBVY9muah+jzUW8Ppur3UnjJahc41J5ipD4 lCij3XDY4XlxS2O+RcdyEH7y7z+3+NoandMH/61tTnjvbhjBqZb3aQqEf85XO8vK67yQ W2Xw== 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=XdwAG7Z2NZXZHZfuvqH72G/NDNAI/W9LbbG2ezKqsB0=; b=VTtcS4XJnifkfhUy//S68UOfM4iLXGxh1bWWx7m5FaCnNohMOcXhQSJ9WLk8pt2oN8 rMHEb//k7S303MljWfw80AlV4a3rGX249fi6dsILUnqoTGDb3Vs9U1/decvrbsyMlPYk A0CCK4Ux1wrHHVsC0oAgczHbklGRHM7XLl5O884RiWWXUPnWaf4MF4uGpTF+Nw5aa4C3 fcPgowLpbyOid+6UeR16XmJBF/lal9PJNT1DNIEK+C7FZxoPZ4YkhCzptgCMwbXqurZh UrJnR/g/ud6QQQUAQM0TTb5rjOjTAVIf4tyROfSEw/Nt3fGYlSF2xd2CE8ru5uclx0Wv N8Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HGI9nQar; 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 e21-20020a637455000000b0053063a32dacsi2215360pgn.826.2023.05.25.15.13.36; Thu, 25 May 2023 15:13:51 -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=HGI9nQar; 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 S240695AbjEYVn1 (ORCPT + 99 others); Thu, 25 May 2023 17:43:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234142AbjEYVnX (ORCPT ); Thu, 25 May 2023 17:43:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBC3012C; Thu, 25 May 2023 14:43:22 -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 615AD64B71; Thu, 25 May 2023 21:43:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45DB8C4339B; Thu, 25 May 2023 21:43:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685051001; bh=hVFyQUZN1gcvG6t3Dpq635c426eBMKWXinhJ3HGYh9s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HGI9nQarh6/dDMgWqzLaHz2tcFxHEP3FNk3dJo770kxOgy8E0LJyKAqlE+8jo5Iz7 i1gdU/pd6W2jdEXcJru8gg5rlqj9E45F1fCDuQrxTcO5pnOKEUwGjm+1FkxK4Xje9E rIstQEBLmrKi1/p3JTjltsB0DJRnx+6PTnB7SSxulUpBkLLqNXOof1II5O73QtnHMf Auoe2QSPd8MXvUeutyKUrr57FVkUT9ujcnYjjm0IQ2rChSTKMJk449mIHEOBcc3nII kjX50inG7/9hu/5DIb2MKMSXYvHO+KTXbg3InDmIR6bxFsoDsRhMxBZwGRIivtd4Sc r79YnXhY6S1wg== 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 01/10] Docs/mm/damon/faq: remove old questions Date: Thu, 25 May 2023 21:43:05 +0000 Message-Id: <20230525214314.5204-2-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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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?1766905958195463993?= X-GMAIL-MSGID: =?utf-8?q?1766905958195463993?= The first two questions of DAMON faqs have raised when DAMON patches were first submitted. More than one year has passed since DAMON patches get merged in the mainline, and that kind of questions are not asked nowadays. Remove the questions. Signed-off-by: SeongJae Park --- Documentation/mm/damon/faq.rst | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/Documentation/mm/damon/faq.rst b/Documentation/mm/damon/faq.rst index dde7e2414ee6..3279dc7a8211 100644 --- a/Documentation/mm/damon/faq.rst +++ b/Documentation/mm/damon/faq.rst @@ -4,29 +4,6 @@ Frequently Asked Questions ========================== -Why a new subsystem, instead of extending perf or other user space tools? -========================================================================= - -First, because it needs to be lightweight as much as possible so that it can be -used online, any unnecessary overhead such as kernel - user space context -switching cost should be avoided. Second, DAMON aims to be used by other -programs including the kernel. Therefore, having a dependency on specific -tools like perf is not desirable. These are the two biggest reasons why DAMON -is implemented in the kernel space. - - -Can 'idle pages tracking' or 'perf mem' substitute DAMON? -========================================================= - -Idle page tracking is a low level primitive for access check of the physical -address space. 'perf mem' is similar, though it can use sampling to minimize -the overhead. On the other hand, DAMON is a higher-level framework for the -monitoring of various address spaces. It is focused on memory management -optimization and provides sophisticated accuracy/overhead handling mechanisms. -Therefore, 'idle pages tracking' and 'perf mem' could provide a subset of -DAMON's output, but cannot substitute DAMON. - - Does DAMON support virtual memory only? ======================================= From patchwork Thu May 25 21:43:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 99221 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp63498vqr; Thu, 25 May 2023 14:46:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7NtnJl36E3dxii+JeQk+ByZZ+Dw79dp4a/ihg3cPeSfNyajIf/rdDVBTR5sOiB+WPV9RH4 X-Received: by 2002:a17:90a:7887:b0:24d:f2f5:f571 with SMTP id x7-20020a17090a788700b0024df2f5f571mr41054pjk.36.1685051207314; Thu, 25 May 2023 14:46:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685051207; cv=none; d=google.com; s=arc-20160816; b=e80G3MnR2WsCVKjZsZwmHy+e/9q8nLcKA5LYHAgOBElDdasxHQOnNRjHv26pDUVBVV bSMlEVE6SB14qkXjgztrOXGzMbDMRcrUQeI0QDDB7gLhzS8fkYQhY6W0GYDYS6sTQO93 F+INV5ppMWgehvQ9nWE5q71AH9tt7h2irsIedhLmQvjQRJP7TE1gDOCuoj9B6oSM0HK+ ePmv24pt9ObpwNx3sk/q8haWTmZFYoOza7sBPujiyAsyI/LrbTl05lT2hwsSJwTAqeZK 0kwsSbPgE4RSbFXlioujkGldIbAxrAsqtH7LcVyBBab5OftN3mZ3vta+6FX/XUvaU10f mLAg== 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=K34Y8Ms5l2q08ZJDQpDXu8NAMg3mVVvo34+WffImOq4=; b=nZm/RZ+4xawLUQZhdvPHPINFR09ZMisSoKX2UnDXwXUi/jSxziLKnyZz1OxwNtHBqE j07XWh0NwjF1NXlP2RJeWEwgVx15lhA79upJoIIVgGKieVlBxyGlKgvYgpk5vYA8YiLG ySYpRLITF4pCA47YjZ4KcrziavvYm6+OolAyKB0QlbWHzwb1c7InkvIl/CZk/015SMUV lSeoq9YAsIp1raJdnPdFiPZIOOgORTSBxXVOe4RhhNVrVhgmF7WwFEEccG+jbdjmpLw7 ON6Oe5Z38dnfb89TO06iqHh8ML4ZgIlPcjb3OsF+cSBY2IE6+fJysmp7mriZVbGo+EiQ 07dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z1A0tFYg; 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 i2-20020a17090ac40200b002533a4c9ed9si181401pjt.21.2023.05.25.14.46.32; Thu, 25 May 2023 14:46:47 -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=Z1A0tFYg; 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 S241944AbjEYVna (ORCPT + 99 others); Thu, 25 May 2023 17:43:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241879AbjEYVnY (ORCPT ); Thu, 25 May 2023 17:43:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BAFB134; Thu, 25 May 2023 14:43:23 -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 186D164B66; Thu, 25 May 2023 21:43:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C201C4339C; Thu, 25 May 2023 21:43:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685051002; bh=pAFa7HjQcx+ryoZoo4sJVjdW99Hl1Us5CqTxI7BWAYM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z1A0tFYgWDn5FVYiNaylQFNzXACGLTl6XaeSun3nAY6cxd7j4cbM62HvjMInzXGVF ITZMEKzaOKPGGv7WAHa4kK6HXx/Vz1uPfJTn9s8RpNji2siobULCWgMXZbNJLjPMHs 2/ACgdIDPn4BifqOaxC/TI36gn1iZHLXPwpLXx714PesThwWjpJPQpRSdcE11AfXye apBJRMF5DdsyTAoCWbiaMtzVy5g0fFbBYk7tMGx1iplnT4Ya4b6m4vhurRrgTEBJVG CqaLEW/orZWTA7XaqCGzDPRzgnRwy0ceUKdt/QjssIqIUAb9UHndd6BNi10PHd0Ph9 w4ppJKX97Umzw== 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 02/10] Docs/mm/damon/maintainer-profile: fix typos and grammar errors Date: Thu, 25 May 2023 21:43:06 +0000 Message-Id: <20230525214314.5204-3-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?1766904254961998681?= X-GMAIL-MSGID: =?utf-8?q?1766904254961998681?= Fix a few typos and grammar erros in DAMON Maintainer Profile document. Signed-off-by: SeongJae Park --- Documentation/mm/damon/maintainer-profile.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/mm/damon/maintainer-profile.rst b/Documentation/mm/damon/maintainer-profile.rst index 24a202f03de8..a84c14e59053 100644 --- a/Documentation/mm/damon/maintainer-profile.rst +++ b/Documentation/mm/damon/maintainer-profile.rst @@ -3,7 +3,7 @@ DAMON Maintainer Entry Profile ============================== -The DAMON subsystem covers the files that listed in 'DATA ACCESS MONITOR' +The DAMON subsystem covers the files that are listed in 'DATA ACCESS MONITOR' section of 'MAINTAINERS' file. The mailing lists for the subsystem are damon@lists.linux.dev and @@ -15,7 +15,7 @@ SCM Trees There are multiple Linux trees for DAMON development. Patches under development or testing are queued in damon/next [2]_ by the DAMON maintainer. -Suffieicntly reviewed patches will be queued in mm-unstable [1]_ by the memory +Sufficiently reviewed patches will be queued in mm-unstable [1]_ by the memory management subsystem maintainer. After more sufficient tests, the patches will be queued in mm-stable [3]_ , and finally pull-requested to the mainline by the memory management subsystem maintainer. From patchwork Thu May 25 21:43:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 99218 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp62867vqr; Thu, 25 May 2023 14:45:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ44SWBwNoT5qdNhcn1AVMhggYc3X+kor1hbo4+oDNVsWcbzSDvBfL9NaUqiT0ZMpA8b/OyJ X-Received: by 2002:a05:6a20:43a8:b0:10d:5430:c8d6 with SMTP id i40-20020a056a2043a800b0010d5430c8d6mr7836403pzl.0.1685051128229; Thu, 25 May 2023 14:45:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685051128; cv=none; d=google.com; s=arc-20160816; b=dSlq8oxaoCe93zFi4uZcrT8V1kyMbOuZ1M0uUKDk1XyZU4oO35TJ48ZTaeRoqzZEbE KGXzYRZP3VvEqWkUDSlxPWMY6MvlHxrAtmsPCIStscD/jeM0ZQjhkdcAnaWASUh8eZh6 v/O7yjG81eGDuSDgG+so7sb0gKj8PSdvOPDJr8gkMBCQkHsGvagtz0wzd5AnjCtb9VUD pArhmdXhAVCz5CA1QUUrDS7sN+oUU387CfL5pcoBH8pybPRWMo2XvdhWJ4I6ucoLgRdK XfprvhzMgaypsCHccP1WYAAGtCKt6DBAw5smp9f3Y404RzBBjNi7FhvEczU48FwRK+Y3 CtFQ== 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=LlxKsvSOUXUuc/6VjlqHU58JIVzwlKNwUJ+uGxjs7YU=; b=BOJg/Jj61KHS+bt4IRSP/KnY38p46P+BZ7KKnw5sDmA7buyKtTrOmeUlBZDlGVFNom 3/zsrWUCFRpAXInlA0NXS6SQWDEAucF1ieckzPiVU+waDKgv01Q0xMlbKKbX7DdIWwz2 nNCbjjKsXoCDLnNrjz2tUqmNfkVedd/GKIZd/E8LrGOZ9tBGjwEcAgd2525z1aon/NUh CsCcmRlqXky/JecQUtv99yAk1ebizBWsnp62dzVUa+4/kiWKosTJ2WDkbTHAKWSuaPtX E6eaYfB+AVAatTxwGXnbgxaFG6JW7nACtGgUONZzFX4nKdoNYnpnd6IXpFUobyd1de6Z GvlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HMEhL3qQ; 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 t184-20020a625fc1000000b0063d2130eadasi1560859pfb.256.2023.05.25.14.45.13; Thu, 25 May 2023 14:45:28 -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=HMEhL3qQ; 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 S241949AbjEYVnd (ORCPT + 99 others); Thu, 25 May 2023 17:43:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241885AbjEYVnZ (ORCPT ); Thu, 25 May 2023 17:43:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B410FB; 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 C4F1064B74; Thu, 25 May 2023 21:43:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B759DC4339E; Thu, 25 May 2023 21:43:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685051003; bh=NrQxqhDPJ98oboAlR28uGqZUlrS5AmTee+Fa9XTxEmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HMEhL3qQzSUfgwpeBq+8adhjQX0oA4pjhIziNSyjvfCrbF07AwIQT5mklBCXNW4El ROYP9lK+EThF92y9nRLfHJuEWU1NKEtpaIIT3mXlie0WS4ayg6fTmMMImd9+G3nRcY rJ6eJlL4H6bqb+IIyAikKIcjHEgRmAm/WCk3WEBYhgNB1wsoa+ihRuDldcZhlI7erU JSKB8p5tAF8CiYaxOprLoQhCBSkcvD0IOpIMrA9tHfym3lVX38jT5MD1NMFtDVc0mB vvrrDIAKi7niiwB8aSS7dmA0rjtv9HQpKPqXvVqRW2ZO6Uo7dfTRWRdGDVpzr7f8vG ItX0vPPjynI1Q== 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 03/10] Docs/mm/damon/design: add a section for overall architecture Date: Thu, 25 May 2023 21:43:07 +0000 Message-Id: <20230525214314.5204-4-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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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?1766904171834509602?= X-GMAIL-MSGID: =?utf-8?q?1766904171834509602?= The design doc is missing overall picture of DAMON. Add a section for overall architeucture and layers. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 0cff6fac6b7e..3b4ce873fa71 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -4,6 +4,21 @@ Design ====== + +Overall Architecture +==================== + +DAMON subsystem is configured with three layers including + +- Operations Set: Implements fundamental operations for DAMON that depends on + the given monitoring target address-space and available set of + software/hardware primitives, +- Core: Implements core logics including monitoring overhead/accurach control + and access-aware system operations on top of the operations set layer, and +- Modules: Implements kernel modules for various purposes that provides + interfaces for the user space, on top of the core layer. + + Configurable Layers =================== 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 From patchwork Thu May 25 21:43:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 99222 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp63601vqr; Thu, 25 May 2023 14:47:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ60/W0BldknlrfINQgJyjkOf6JggDVFywb8LdR1wS53+Q2b5+CK0hu2mMGEq60a2eHELCe+ X-Received: by 2002:a05:6a00:2d2a:b0:64b:256:204c with SMTP id fa42-20020a056a002d2a00b0064b0256204cmr149111pfb.20.1685051220173; Thu, 25 May 2023 14:47:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685051220; cv=none; d=google.com; s=arc-20160816; b=YpueYWesA/uIiLFc519G77gNHrTaCzK2ZG4tujel2I7y5yzaKMWWJutRirRfcTkkZ6 ktSY7JgFbwf7jUb0dKBkcdB/38T15FScG69/vV7BSwjq0GNvgNRA5i6+8KcOJeC2XFcr zvs+qy/bGcitw0IJtqpj9XwTKcKoeL9/YDILhdVPQIyxjH1LaARbg75Z6es8T5tCMUpV 7H7HMeUml49Qe6Avq1C7Sisaakjhr6M0X0+WsvHsD2kqR3BLUYq/qCoGFe9olcFusWkn AOqsCixnyH7DfnSueybHfhJ5saP+aZTulh6VwacQ/ioUzXdBlRi6jPJ7SImE9O04/nyZ akCQ== 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=kVj9MGetKxz20CAAyMJ+u5vcrf5oTJJGhw5moEiDoaY=; b=j+qiUtvLv+x717vR+Q89wYs6WeYVaWFOHVmvX5i8YzLDOtTvp38tV//pqGMWeZkg8S IxB+tCV02X/5cKOj4M1K+HedYTPTsJrYsqdcHZaCJc81bUJsr0qTFya6nEmAWCUnTNeX 4ZmdZ9Tp/Pj+y+w9+5Sl6xOKbpDuNw/qjJ0lF7jxpA6jQjm3YqqtUY7bPPlJkTx9/GQa lQzhq28sbtmh5TO2Bkr4zW+MO+RJh1pMXtZJ/prDvoIbvEKamsE2LOHRoBZVsDL6//iK vP/iqtmHoQl9VyWuxMJoPwYgmDT9yEPFgHB1ve2/yPceKfnuNRgQVN6F1Y2FbtV7XxR4 65jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZRtNgrzl; 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 x20-20020aa79574000000b0063b7790fde1si2389412pfq.284.2023.05.25.14.46.46; Thu, 25 May 2023 14:47:00 -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=ZRtNgrzl; 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 S241716AbjEYVnk (ORCPT + 99 others); Thu, 25 May 2023 17:43:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235214AbjEYVn0 (ORCPT ); Thu, 25 May 2023 17:43:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E2FF134; Thu, 25 May 2023 14:43:25 -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 4846764B7C; Thu, 25 May 2023 21:43:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36A86C433AA; Thu, 25 May 2023 21:43:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685051004; bh=kRx7Ql+X4ob3mmhrjF9h89mhxljZdGi0sjiE1FJX5Zc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZRtNgrzlQpPWHCCJkCxIGW1T5QYX30ZV8PyfpuCpNijZF9fG2o9gwhI6hI1HuJuXB hEwvfN7QVmwNyqjHfLLBfdaSIwkwvAeh4ai3YycdDhNdLrn/guKnvJYpJxeSa1o32c m2WjEJiDsMxQNDzClBhV3o2/T/UchbSiFGGtIQ+d0lsE1tOsOIlXxCuEgOEhMSMPla JQJBV6ZYCoZXflk0PqwtzFGyYe6sLxQAQ7MU1tQjmuPzm2vL+AiCHkc4D7ehrXqizE HD1eVdUSAJxbUwSnSU5CRNkR6EqAb+1My+CxxAybPlhXoNzE+GHkvt7oYzk5/Nb5Bk kz20ij5EG1pUQ== 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 05/10] Docs/mm/damon/design: rewrite configurable layers Date: Thu, 25 May 2023 21:43:09 +0000 Message-Id: <20230525214314.5204-6-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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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?1766904268289432192?= X-GMAIL-MSGID: =?utf-8?q?1766904268289432192?= The 'Configurable Operations Set' section is a little bit outdated. Update the text. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index eaf52f3a9144..4a22bab124cf 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -22,24 +22,23 @@ DAMON subsystem is configured with three layers including Configurable Operations Set --------------------------- -DAMON provides data access monitoring functionality while making the accuracy -and the overhead controllable. The fundamental access monitorings require -primitives that dependent on and optimized for the target address space. On -the other hand, the accuracy and overhead tradeoff mechanism, which is the core -of DAMON, is in the pure logic space. DAMON separates the two parts in -different layers and defines its interface to allow various low level -primitives implementations configurable with the core logic. We call the low -level primitives implementations monitoring operations. - -Due to this separated design and the configurable interface, users can extend -DAMON for any address space by configuring the core logics with appropriate -monitoring operations. If appropriate one is not provided, users can implement -the operations on their own. +For data access monitoring and additional low level work, DAMON needs a set of +implementations for specific operations that are dependent on and optimized for +the given target address space. On the other hand, the accuracy and overhead +tradeoff mechanism, which is the core logic of DAMON, is in the pure logic +space. DAMON separates the two parts in different layers, namely DAMON +Operations Set and DAMON Core Logics Layers, respectively. It further defines +the interface between the layers to allow various operations sets to be +configured with the core logic. + +Due to this design, users can extend DAMON for any address space by configuring +the core logic to use the appropriate operations set. If any appropriate set +is unavailable, users can implement one on their own. For example, physical memory, virtual memory, swap space, those for specific processes, NUMA nodes, files, and backing memory devices would be supportable. -Also, if some architectures or devices support special optimized access check -primitives, those will be easily configurable. +Also, if some architectures or devices supporting special optimized access +check primitives, those will be easily configurable. Operations Set Layer From patchwork Thu May 25 21:43:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 99223 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp66428vqr; Thu, 25 May 2023 14:54:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6+ZAoUbVXjJLjCXKu7K/hMTOlOfzNf26QNdaiz31lQ7yV10H/Z2RMr3ZlUx+rGRxULhxhQ X-Received: by 2002:a17:90a:5b01:b0:255:5a5e:df38 with SMTP id o1-20020a17090a5b0100b002555a5edf38mr69301pji.33.1685051656991; Thu, 25 May 2023 14:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685051656; cv=none; d=google.com; s=arc-20160816; b=dlhK2O7WxSqk6Ia01A+eli6m2294tvIs/3xynuWBck70ll7mvCjUHH5nO+lBBMlbEX nADH/rW402WSGCqkXi6rtQG3MGRrq8TXZK8Ypc0CEygerjvnLWHPAowQIt6tstAVZped a7IDJe3K5TWeat4YW8tUhYWqI8bY5N82ArmELo/rb2c4zLgDqk6lAMb4iHJLHZ0WWWxS f5DTOHZwhrcuB8FE2sBrgRzScb4c4sVYfoKcoyqqdyN5HswYAj33oaYRBYunAsYg04cd Vwhky2oiBp1xOk+WGHnpPNJNMlIrm8+F70XBnsMv9CccPcDpxfUBc4H3mjvtHhNEfijS yRdg== 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=4azbihuw5xeIghnL2EFrrkWz3xRoWcMEXyumEeCz05E=; b=qh4/V7E6SwQQ7gnz1GwNpJIIldSpJAZdp1VSwWsEf1/WZb4Vc27EhKMFH9Ygu0xlzN BGOsQBr41GKoyDooZ07gas9N83rfSWLOPYh1kRXP50p+8GIzYKa608KSiQ6IZuBs61lD EgOvyEc7JsVzD4qi9jvziH8ff6g0lfS4jvNutDNgQNEEVrN2I1OqbQVcbxdWCTaK6TKk 6H7XxVKbbGfrOsQnqhRdISfqejF+vx8KHfGgT1/1FtzVNOVupyWKePnAokYTZC6oN+5Y 2Y+1aKXLplK5eTFm79gAI+40OyKxuJv/Q5g663Jt6y3L0y5xIP8LDRX02JLwE0ie38op pIFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m66zBEyU; 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 kk2-20020a17090b4a0200b0024e1172c1d5si2643807pjb.155.2023.05.25.14.54.01; Thu, 25 May 2023 14:54:16 -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=m66zBEyU; 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 S241981AbjEYVnn (ORCPT + 99 others); Thu, 25 May 2023 17:43:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241922AbjEYVn1 (ORCPT ); Thu, 25 May 2023 17:43:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61A21FB; Thu, 25 May 2023 14:43:26 -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 F189864B5E; Thu, 25 May 2023 21:43:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3F02C4339C; Thu, 25 May 2023 21:43:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685051005; bh=ajEgfoPi4mQLMDMHVEFRgzRHD6TvLlqgYGgpcmGScQc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m66zBEyUfmCHCn8eqRJo7jy6hhFYE0z8qSqIKv/ocFre/3j2zl5dAs3Q+xajxI8Xc tn1D02jKcsAEw4JkGIcrrZwanKto7rchuYRxJZPQRgI2D75KsdZJF4gAS0w5P/yMjQ gZi6aD5/uwDKpNNfZuMeFBUYsE+40xXMBc8AleEf2Ugq4ZvcEyjNx0lejmzbQQB6hF VGQwiHmC1aruQ6iCJRhSpAR+J/LuCA3aWm3G7Iiq5o4kfPjbVQ1yVBKc4ItrzTpwNn TJpbfOOkBKWNXrJaJfS79kjCqRs1jkR9Q0LdkTMCJJBSz46ITvg+2Oatux3sBcFoGt ciBVpJ/GZEb3g== 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 06/10] Docs/mm/damon/design: add a section for the relation between Core and Modules layer Date: Thu, 25 May 2023 21:43:10 +0000 Message-Id: <20230525214314.5204-7-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?1766904726163118556?= X-GMAIL-MSGID: =?utf-8?q?1766904726163118556?= Add overall desription of the interface and the relation between the Core and the Modules layer under 'Overall Architecture' section. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 4a22bab124cf..41abd0430dd7 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -41,6 +41,16 @@ Also, if some architectures or devices supporting special optimized access check primitives, those will be easily configurable. +Programmable Modules +-------------------- + +Core layer of DAMON is implemented as a framework, and exposes its application +programming interface to all kernel space components such as subsystems and +modules. For common use cases of DAMON, DAMON subsystem provides kernel +modules that built on top of the core layer using the API, which can be easily +used by the user space end users. + + Operations Set Layer ==================== From patchwork Thu May 25 21:43:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 99225 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp67433vqr; Thu, 25 May 2023 14:56:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7MRekK7AHF8OUi4M5+JRovcJH4vDnxKovhwLTxP/FWCyaRng5wodPSd3iGmILrqCqClk9L X-Received: by 2002:a05:6a20:9f99:b0:106:feff:71d with SMTP id mm25-20020a056a209f9900b00106feff071dmr18827729pzb.39.1685051798930; Thu, 25 May 2023 14:56:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685051798; cv=none; d=google.com; s=arc-20160816; b=ryJwC9aswV4gfNFuCRwGXjptfim11V16h/pCTLTtb9DkE2r5KeSuARqVC/blRgonhK +HGnxDHztC5T791fhjbNzGK8+6krHmXPZWk9q+4go9TelrRbkK/CpWWDCOMjcVMcAbaf WYTxiOxqj8j2goT035gDfFK6niErNa7tFMj6y+MrsIDVh36n9CWQHLa69AGxVEvw215x kF6uFb/ziIqz38lBZMX6F+GAR4S8apTvzWNMG+aSEY4YNCOGaIA32svpoleHAXCsQiLe Zo0Xm74lOPp57zc9zUi5gNya0HrXD4I9IlpXuhTeJV1cskvQblRD9Ss/SiNoa9SDKZDJ /Zhw== 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=I6GWwUgfbn7yeMpa/l9FEN4Tg3PHGkeps/QvA310OWs=; b=ksskBouYTyvQMqkYrlK59DvaO7rnDEfH9OF17DUHYboSVF/gyMiDjiwb0hF7djWJKD 2I9yn1i3eb60VuWkDpCd3PV4vF88U8t3X0MB1Ctv6UJqhBiK0Xy7zgst2oorOsfOimMe XlDTAE54byO2+zWd10N4niDXjhiduqV1i8SUpTTA6cyKyIdPcaFYNaHg4aJj9s603cBG Ykuuxt77/mE52aZjCNp97XYwyDZulYUR4L5im6sBhqfvUT92BhEGR3XCrlw5T+rIGZtM oincOgwEapkX7Y3Vh5HAWwnkA0r3e/K9QHZzojNEK7nwT5VhaDZ45mrXWnKTPtEXKBou q84g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nzbBk6KC; 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 x19-20020a63b213000000b0053f3e25b944si842481pge.749.2023.05.25.14.56.26; Thu, 25 May 2023 14:56:38 -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=nzbBk6KC; 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 S241947AbjEYVnr (ORCPT + 99 others); Thu, 25 May 2023 17:43:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241926AbjEYVn2 (ORCPT ); Thu, 25 May 2023 17:43:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9BC512C; Thu, 25 May 2023 14:43:26 -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 BA7B164B75; Thu, 25 May 2023 21:43:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C31EC4339E; Thu, 25 May 2023 21:43:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685051006; bh=APr09IDiXGykzuGGa19YHF7doztMwWo2QuV04whzSE8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nzbBk6KCaeEKjgaCqUIVU5hTiLijuoQ2H2aJfAUzxi/UVr0w7ei8EnEamotAgKXfL 1JF/RgO5UylZl9FlBIpP399R6mpJfXhfU8jx72dyC0YDzfWvAjkDaf22nyQ9VIRqeY Xc1e1uEfUPDeYFysPQ5t9qDZVJhWXzg5djp9FRE5fSGQuimSe0YWEqmJwuoR1rQPUG G6i6YnbO3iJYJqgyTvJVVAByL5/4lUEU039yAGDyAX0TIFjzqJFJatQ/no1KeLwdNx G84vkoXyWM1gRPfQVIfhW57qQ2wnQ8HyVM7PXxMOYP2YxHQXN6+/hlIyR+gXywy4Pt niR+/fxAA9vmw== 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 07/10] Docs/mm/damon/design: add sections for basic parts of DAMOS Date: Thu, 25 May 2023 21:43:11 +0000 Message-Id: <20230525214314.5204-8-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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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?1766904874803504473?= X-GMAIL-MSGID: =?utf-8?q?1766904874803504473?= DAMOS is an important part of DAMON, but the design doc is not covering it. Add sections for covering the basic part of DAMOS. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 70 +++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 41abd0430dd7..9f9253529c3d 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -202,3 +202,73 @@ monitoring operations to check dynamic changes including memory mapping changes and applies it to monitoring operations-related data structures such as the abstracted monitoring target memory area only for each of a user-specified time interval (``update interval``). + + +Operation Schemes +----------------- + +One common purpose of data access monitoring is access-aware system efficiency +optimizations. For example, + + paging out memory regions that are not accessed for more than two minutes + +or + + using THP for memory regions that are larger than 2 MiB and showing a high + access frequency for more than one minute. + +One straightforward approach for such schemes would be profile-guided +optimizations. That is, getting data access monitoring results of the +workloads or the system using DAMON, finding memory regions of special +characteristics by profiling the monitoring results, and making system +operation changes for the regions. The changes could be made by modifying or +providing advice to the software (the application and/or the kernel), or +reconfiguring the hardware. Both offline and online approaches could be +available. + +Among those, providing advice to the kernel at runtime would be flexible and +effective, and therefore widely be used. However, implementing such schemes +could impose unnecessary redundancy and inefficiency. The profiling could be +redundant if the type of interest is common. Exchanging the information +including monitoring results and operation advice between kernel and user +spaces could be inefficient. + +To allow users to reduce such redundancy and inefficiencies by offloading the +works, DAMON provides a feature called Data Access Monitoring-based Operation +Schemes (DAMOS). It lets users specify their desired schemes at a high +level. For such specifications, DAMON starts monitoring, finds regions having +the access pattern of interest, and applies the user-desired operation actions +to the regions as soon as found. + + +Operation Action +~~~~~~~~~~~~~~~~ + +The management action that the users desire to apply to the regions of their +interest. For example, paging out, prioritizing for next reclamation victim +selection, advising ``khugepaged`` to collapse or split, or doing nothing but +collecting statistics of the regions. + +The list of supported actions is defined in DAMOS, but the implementation of +each action is in the DAMON operations set layer because the implementation +normally depends on the monitoring target address space. For example, the code +for paging specific virtual address ranges out would be different from that for +physical address ranges. And the monitoring operations implementation sets are +not mandated to support all actions of the list. Hence, the availability of +specific DAMOS action depends on what operations set is selected to be used +together. + +Applying an action to a region is considered as changing the region's +characteristics. Hence, DAMOS resets the age of regions when an action is +applied to those. + + +Target Access Pattern +~~~~~~~~~~~~~~~~~~~~~ + +The access pattern of the schemes' interest. The patterns are constructed with +the properties that DAMON's monitoring results provide, specifically the size, +the access frequency, and the age. Users can describe their access pattern of +interest by setting minimum and maximum values of the three properties. If a +region's three properties are in the ranges, DAMOS classifies it as one of the +regions that the scheme is having an interest in. From patchwork Thu May 25 21:43:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 99235 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp89494vqr; Thu, 25 May 2023 15:42:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5HJdho5cEE44aNFtxPwMrx3k5Jz0JxIJc0hCx1oTurrnuW/QCpJyZf5saApf9xh7V/ZV0e X-Received: by 2002:a05:6a21:3298:b0:10e:43e:e223 with SMTP id yt24-20020a056a21329800b0010e043ee223mr8218791pzb.1.1685054548179; Thu, 25 May 2023 15:42:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685054548; cv=none; d=google.com; s=arc-20160816; b=W2ARYWXYKjX2+KuNqmNrWMM1nxdnuZN/igoD1YizCKlp5rpRTrsRllVH/1F3JvLTJo hxRCzGDmGZNLBs2GwPoa/sIzupleh3cExQum/DiAMYEKi54aoLuUIExUaQKBidtfhnr5 COyFN7lWAL8Jjgl8EdVPceXs59i4YNJoGmhaAWQeImdesVp9a7+oUqoGf2GsaklY5kOy PsWNnS0Mxnfjzom0pP5TAZ+tgxi9yuhkPKW9vVvou/ipIF5fZzdepgOBHGFxGXim2/mI 67CyvJoB7CF7ekPAH+c8T6j3hVx3WFX/zBFJb/cryeNS4hSOZQTD/Kk6NtVg63sZleYc fx6A== 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=1bpl8Yfo5pgzplMslR4GuMy14UBS+T1/lk8+x+aio/s=; b=hy6tG+59V4rXWDPzC2hiZUvc3MZQA/yueDRiNEaeyNP6SMfuSElbWpBpnGssp94K/4 DJTS/ojGIvy+E1U56MhFeg0f6i90DR+yGHP8Tl8ZbyswbWIlTqGPZwQckrxLGJjhuKaG f0g4Rn+/QcUI1UBvxcYUsDbnzs1c8sT+jEMVyVdkeGY7F2o4gvaZqk1lOyxDOtO2q5u5 xPx9LMAf7GbknrQDKQoCI4BwGiwsga57/+7mtVLGhmxYLS+AeT8N4dHNExIvFIDn8EA0 LWZVI9w6i63giiZ44UASkYBxwVWuF8wo2ohQjjOh0qYMf8Z3afwQCKGx2dcxH4DEfIpI mcKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hyX8pFa7; 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 c20-20020a6566d4000000b005186ed361f4si1411049pgw.315.2023.05.25.15.42.15; Thu, 25 May 2023 15:42:28 -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=hyX8pFa7; 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 S242000AbjEYVnu (ORCPT + 99 others); Thu, 25 May 2023 17:43:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241928AbjEYVn2 (ORCPT ); Thu, 25 May 2023 17:43:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95840FB; Thu, 25 May 2023 14:43:27 -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 775BE64B5E; Thu, 25 May 2023 21:43:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 628EAC433A1; Thu, 25 May 2023 21:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685051006; bh=AEj9qz2MGylaqhssIqrE5GKEjpK4WMFP3qXqID5+yXQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hyX8pFa7iyjjjRl1mWdTIaxIwE+6WFCkNPN3hr1dMZUbd+dPKp0C5ADoR9CsBve9e bnXfddX2Lx5JKSre0HSsSFXWjoS0veM3uj+tf9iB6+Z3B731NSUoWlbJviUioTQ2T+ TKiuM2414KdPdO+JIp3/GNkwfs/OPQ8Kv2HhHogrZ9mMs1xAmQ3Qf9buiZMjoEaKiK Kyz8vNjhJVeAsCPtdFGbqmUnKclrt1FiidxrBYcPx3a9bTxGCHM2JVKZ9hKVBwngoN 4YbweD3aLPcS6BAaaKehmKagw4Rjm1HyNFMbf+Tz63hB2AVFEEhlTZRQGCXYuzgqq0 D1HuQ9bJBt11g== 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 08/10] Docs/mm/damon/design: add sections for advanced features of DAMOS Date: Thu, 25 May 2023 21:43:12 +0000 Message-Id: <20230525214314.5204-9-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?1766907758034465875?= X-GMAIL-MSGID: =?utf-8?q?1766907758034465875?= Add sections for advanced features of DAMOS including quotas, prioritization, watermarks, and filters of DAMOS on the design document. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 86 +++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 9f9253529c3d..706dbc17c6cb 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -272,3 +272,89 @@ the access frequency, and the age. Users can describe their access pattern of interest by setting minimum and maximum values of the three properties. If a region's three properties are in the ranges, DAMOS classifies it as one of the regions that the scheme is having an interest in. + + +Quotas +~~~~~~ + +DAMOS upper-bound overhead control feature. DAMOS could incur high overhead if +the target access pattern is not properly tuned. For example, if a huge memory +region having the access pattern of interest is found, applying the scheme's +action to all pages of the huge region could consume unacceptably large system +resources. Preventing such issues by tuning the access pattern could be +challenging, especially if the access patterns of the workloads are highly +dynamic. + +To mitigate that situation, DAMOS provides an upper-bound overhead control +feature called quotas. It lets users specify an upper limit of time that DAMOS +can use for applying the action, and/or a maximum bytes of memory regions that +the action can be applied within a user-specified time duration. + + +Prioritization +^^^^^^^^^^^^^^ + +A mechanism for making a good decision under the quotas. When the action +cannot be applied to all regions of interest due to the quotas, DAMOS +prioritizes regions and applies the action to only regions having high enough +priorities so that it will not exceed the quotas. + +The prioritization mechanism should be different for each action. For example, +rarely accessed (colder) memory regions would be prioritized for page-out +scheme action. In contrast, the colder regions would be deprioritized for huge +page collapse scheme action. Hence, the prioritization mechanisms for each +action are implemented in each DAMON operations set, together with the actions. + +Though the implementation is up to the DAMON operations set, it would be common +to calculate the priority using the access pattern properties of the regions. +Some users would want the mechanisms to be personalized for their specific +case. For example, some users would want the mechanism to weigh the recency +(``age``) more than the access frequency (``nr_accesses``). DAMOS allows users +to specify the weight of each access pattern property and passes the +information to the underlying mechanism. Nevertheless, how and even whether +the weight will be respected are up to the underlying prioritization mechanism +implementation. + + +Watermarks +~~~~~~~~~~ + +Conditional DAMOS (de)activation automation. Users might want DAMOS to run +only under certain situations. For example, when a sufficient amount of free +memory is guaranteed, running a scheme for proactive reclamation would only +consume unnecessary system resources. To avoid such consumption, the user would +need to manually monitor some metrics such as free memory ratio, and turn +DAMON/DAMOS on or off. + +DAMOS allows users to offload such works using three watermarks. It allows the +users to configure the metric of their interest, and three watermark values, +namely high, middle, and low. If the value of the metric becomes above the +high watermark or below the low watermark, the scheme is deactivated. If the +metric becomes below the mid watermark but above the low watermark, the scheme +is activated. If all schemes are deactivated by the watermarks, the monitoring +is also deactivated. In this case, the DAMON worker thread only periodically +checks the watermarks and therefore incurs nearly zero overhead. + + +Filters +~~~~~~~ + +Non-access pattern-based target memory regions filtering. If users run +self-written programs or have good profiling tools, they could know something +more than the kernel, such as future access patterns or some special +requirements for specific types of memory. For example, some users may know +only anonymous pages can impact their program's performance. They can also +have a list of latency-critical processes. + +To let users optimize DAMOS schemes with such special knowledge, DAMOS provides +a feature called DAMOS filters. The feature allows users to set an arbitrary +number of filters for each scheme. Each filter specifies the type of target +memory, and whether it should exclude the memory of the type (filter-out), or +all except the memory of the type (filter-in). + +As of this writing, anonymous page type and memory cgroup type are supported by +the feature. Some filter target types can require additional arguments. For +example, the memory cgroup filter type asks users to specify the file path of +the memory cgroup for the filter. Hence, users can apply specific schemes to +only anonymous pages, non-anonymous pages, pages of specific cgroups, all pages +excluding those of specific cgroups, and any combination of those. From patchwork Thu May 25 21:43:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 99219 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp63223vqr; Thu, 25 May 2023 14:46:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7D+em1pekv55LwApAmVaJXhyOj9a4hhSKKeM5Zj68xaa+70UOD397pqUbBWx2yjUeEqDzO X-Received: by 2002:a17:903:2442:b0:1ad:eb62:f61c with SMTP id l2-20020a170903244200b001adeb62f61cmr161346pls.11.1685051171412; Thu, 25 May 2023 14:46:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685051171; cv=none; d=google.com; s=arc-20160816; b=RfHVWd9qvLnC0uFPpT2aI0UmjSP4x62QlbUw2tbZBPRAkR6xgl8FLGAI4jtL+te00W N70F7pY6FR7qQFsRKf3MBX0gtfX7vUYvi2amy2I2T4h1b4EbKYtOir23BVGpvhL3v7fC OiN4sdIM5O7LtNxeNM4QN2QDyOLE1mvGe93yA2V+MbeeHuWq/bJUWFfIdashx6SfR0Ps OeYIGnaodwd6/1lSX6M4udEtgXac5jWDDPjDlUlmeP+tOdrwm+mz4PkBCFNGVuHjZplp phbRonWRAOCHq1f2il9ro7DtPYTelksQwCsoD+FVKrvNJaPmoZw3OYZ23AqpHxkQGK5s Ahkw== 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=EHFw/0bbYxWESWQzXcxnUDPytC/XadxJBBIMogJ9w8Q=; b=lLAxDbMe+oUbDcDV/wcs6nKGuLyvvjpKAiw0w+S7Vod8rftg1W7y0AIQZEe9dz2u7m e6J7gMTczRxS0AN8LrHZYpcEwjJCTO6ayDZsF5hiNqwwI7dwT8vc08DHjlmg+N+S0/BC xZme6rqc+hgTmfdqRRworMonc8IrrycoHsHlKMWsfbUSC60keBCEnrVUgLKe4A+/BC9z NuwxT0X0z3vKlw0LDO9Fiq8BlL5EmnCuIEkD5bB/81cWUy8o8f1KIsYWONDKmLkA6YiG lrhBKsI71kVwklM3NiKBZJHHQYIvbFslmc3c9xqJkPlG2OmkkwRshh7K/dqs/MYvNPW8 nMYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nUwAJi3+; 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 x21-20020a170902821500b001a1a9a1d336si2204050pln.206.2023.05.25.14.45.57; Thu, 25 May 2023 14:46:11 -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=nUwAJi3+; 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 S241898AbjEYVnx (ORCPT + 99 others); Thu, 25 May 2023 17:43:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241930AbjEYVn3 (ORCPT ); Thu, 25 May 2023 17:43:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 571DA187; Thu, 25 May 2023 14:43:28 -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 2FF3664B7B; Thu, 25 May 2023 21:43:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FD41C4339C; Thu, 25 May 2023 21:43:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685051007; bh=ZSCtM5xpPfxl9ZcGY7kbIAlY3W8XFj4VJBVoZq5mrJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nUwAJi3+gowT9HAFkMA0ZZUXqK2ioGmXpGUdjFB/arrg1Po32AkJnMJW3vr1F8fVE qRIBYNlqXONIP0Ej+C7cc/MCaVrcckNuW4yEzQ7sIBvgdjWCbVpn/lCXKn9b9fu0oI dnlfRUcIp1zYYpGfvXXb55umKr+yvpGgN6M8KjTixK6MXezkXnfeA8fDKIZecHpPWf LGfcobjbi87gaaplEvo3xfU+sQkC+jAp+vvInameYiGl+KrtIbhVILbRJUl+1HcQeX 7mgDcXYZqiVLlOp1U/byyRYiOev/QYdoYXqSwsMA4SMhMeCfWNDbss1MhsUNGpdt+1 8LcZKj9Jmx1eA== 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 09/10] Docs/mm/damon/design: add a section for DAMON core API Date: Thu, 25 May 2023 21:43:13 +0000 Message-Id: <20230525214314.5204-10-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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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?1766904217284147294?= X-GMAIL-MSGID: =?utf-8?q?1766904217284147294?= Add a section covering the API of DAMON core layer on the design document. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 706dbc17c6cb..0ccdd2f6af9f 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -358,3 +358,15 @@ example, the memory cgroup filter type asks users to specify the file path of the memory cgroup for the filter. Hence, users can apply specific schemes to only anonymous pages, non-anonymous pages, pages of specific cgroups, all pages excluding those of specific cgroups, and any combination of those. + + +Application Programming Interface +--------------------------------- + +The programming interface for kernel space data access-aware applications. +DAMON is a framework, so it does nothing by itself. Instead, it only helps +other kernel components such as subsystems and modules building their data +access-aware applications using DAMON's core features. For this, DAMON exposes +its all features to other kernel components via its application programming +interface, namely ``include/linux/damon.h``. Please refer to the API +:doc:`document ` for details of the interface. From patchwork Thu May 25 21:43:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 99220 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp63437vqr; Thu, 25 May 2023 14:46:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Uup+wWVg9WGZGUBXdoyHd1hp6TIiolYPRHEyKMManSSoN617fWBY7VBXbCVB9XXDnv7rD X-Received: by 2002:a05:6a00:140d:b0:64d:1451:8233 with SMTP id l13-20020a056a00140d00b0064d14518233mr193634pfu.21.1685051198944; Thu, 25 May 2023 14:46:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685051198; cv=none; d=google.com; s=arc-20160816; b=b7DfPQmgrSn0ygKRogqQoNqgytKxhsr8kmnwvGIqvcXVcPhKQf+MGgdat/EcvesWLo hfDYnjgrAbETG5Fw2ojdk8UjeF5e2jyNa+qlG0qNrtfFsqsOJuDi5lRuehOBjcvGOiLI r2BiqstOFmvw4cutJPJG0WLUFdCDdq36mfk6wVyddZW0L3mEjmNhZSIR4nYJp1fm+S0I ENfvEBhWeRpg0nxNASuKLIDBuB5wRlst0lsFWREd3X7wNbeivRqbifJfghQCtb7/U1va ukxYLjpFOGWX8431sbddKToIktg1VEJjFuU4+mEP2Q2vzQIBcGpwoIJadI1owSJhX2YI Gk/A== 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=C8HK/wu9JHzuMNBAUGD9ZvBrx/8Nv6JG92qxVoJ3sNo=; b=QvywrYLezwgzJpjGRQB3JBlQFOvcBKc2Xy97xRSqscC3/yXsG2RDbkd1ZxedQx+oZ8 ZakrDCOc7JY3sTPUx0TEyIkdwM2qS6R499c3afTrLSMaiGwYhuC9XkycvCWXgThDqMCo /S+eqzq4ye8E/AlSOFrqfMWx5R+SQtFJvLtlRd1/GLkHTjeY1WF/BkxIYXajurDXUO2T uf9uHXVFIcyzrlT+y/fYLKklBUh6+M+CZhtKpEC64JlRaEdjDGJVewe/8OXS6uwinfMe A0NkbrSwu23z6cdzsVb+8YOige0ceuwKeeyTmqOTPo11nBeOMHvnt39QeWv4qX4+60Ay SiLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oQoq8UhP; 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 t184-20020a625fc1000000b0063d2130eadasi1560772pfb.256.2023.05.25.14.46.24; Thu, 25 May 2023 14:46:38 -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=oQoq8UhP; 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 S241963AbjEYVn4 (ORCPT + 99 others); Thu, 25 May 2023 17:43:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241948AbjEYVnd (ORCPT ); Thu, 25 May 2023 17:43:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A2B6189; Thu, 25 May 2023 14:43:29 -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 E05C864B6C; Thu, 25 May 2023 21:43:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEB18C4339B; Thu, 25 May 2023 21:43:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685051008; bh=FlZuBr64knJ/8JP07S/l782gvTE23ogKRh6IGqK2gr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oQoq8UhP0KDP7dsBgoau7JHv8ZbqA6Mk7eyiEYs20eSZPB60Mjy409eVD8M/aQbcD mhvONiRVkwQMiWpQGy2aEq1iysz8wQCGutpD9He8OmINpO43C2I9f5UyxRx6vhrG4Z GwcABZVvgk4YVQjaRrLPmRteCzz0RDRcEUGPTHo7kGfrm/9Wut7jkkoODWdXCwnyqL 2QSlv7J+B+eRSGGOID/CsZSG7dx3wZpcXnLYkLriEdYkwxsu2Cwwh9ggRTJ9ddWH/H TYT5d7LSPqBsKYp11iYGrWaFXldnJdRFsJi8Mfohaq/HnpLfAVzXP4HIjxacxLtoHc acztIb1xTvRQA== 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 10/10] Docs/mm/damon/design: add a section for the modules layer Date: Thu, 25 May 2023 21:43:14 +0000 Message-Id: <20230525214314.5204-11-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,URIBL_BLOCKED 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?1766904245557069728?= X-GMAIL-MSGID: =?utf-8?q?1766904245557069728?= Add a section for covering DAMON modules layer to the design document. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 61 +++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 0ccdd2f6af9f..da110e89cab4 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -370,3 +370,64 @@ access-aware applications using DAMON's core features. For this, DAMON exposes its all features to other kernel components via its application programming interface, namely ``include/linux/damon.h``. Please refer to the API :doc:`document ` for details of the interface. + + +Modules +======= + +Because the core of DAMON is a framework for kernel components, it doesn't +provide any direct interface for the user space. Such interfaces should be +implemented by each DAMON API user kernel components, instead. DAMON subsystem +itself implements such DAMON API user modules, which are supposed to be used +for general purpose DAMON control and special purpose data access-aware system +operations, and provides stable application binary interfaces (ABI) for the +user space. The user space can build their efficient data access-aware +applications using the interfaces. + + +General Purpose User Interface Modules +-------------------------------------- + +DAMON modules that provide user space ABIs for general purpose DAMON usage in +runtime. + +DAMON user interface modules, namely 'DAMON sysfs interface' and 'DAMON debugfs +interface' are DAMON API user kernel modules that provide ABIs to the +user-space. Please note that DAMON debugfs interface is currently deprecated. + +Like many other ABIs, the modules create files on sysfs and debugfs, allow +users to specify their requests to and get the answers from DAMON by writing to +and reading from the files. As a response to such I/O, DAMON user interface +modules control DAMON and retrieve the results as user requested via the DAMON +API, and return the results to the user-space. + +The ABIs are designed to be used for user space applications development, +rather than human beings' fingers. Human users are recommended to use such +user space tools. One such Python-written user space tool is available at +Github (https://github.com/awslabs/damo), Pypi +(https://pypistats.org/packages/damo), and Fedora +(https://packages.fedoraproject.org/pkgs/python-damo/damo/). + +Please refer to the ABI :doc:`document ` for +details of the interfaces. + + +Special-Purpose Access-aware Kernel Modules +------------------------------------------- + +DAMON modules that provide user space ABI for specific purpose DAMON usage. + +DAMON sysfs/debugfs user interfaces are for full control of all DAMON features +in runtime. For each special-purpose system-wide data access-aware system +operations such as proactive reclamation or LRU lists balancing, the interfaces +could be simplified by removing unnecessary knobs for the specific purpose, and +extended for boot-time and even compile time control. Default values of DAMON +control parameters for the usage would also need to be optimized for the +purpose. + +To support such cases, yet more DAMON API user kernel modules that provide more +simple and optimized user space interfaces are available. Currently, two +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`).