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: 13255696 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 405D6C7EE2F for ; Thu, 25 May 2023 21:43:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 652556B0074; Thu, 25 May 2023 17:43:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 600FF6B0075; Thu, 25 May 2023 17:43:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4EF7C900002; Thu, 25 May 2023 17:43:25 -0400 (EDT) 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 3EE4D6B0074 for ; Thu, 25 May 2023 17:43:25 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 0CFB31A07E6 for ; Thu, 25 May 2023 21:43:25 +0000 (UTC) X-FDA: 80830103970.11.3BE5518 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf13.hostedemail.com (Postfix) with ESMTP id 5D76F2000F for ; Thu, 25 May 2023 21:43:23 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=HGI9nQar; spf=pass (imf13.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685051003; 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=XdwAG7Z2NZXZHZfuvqH72G/NDNAI/W9LbbG2ezKqsB0=; b=W8kUyu/1Zj8Xy6d82M5v3glRoEzn3T6aeASwJirFT9I5XLkzv9jddm7sMR8dUbbL1qJeqq uYCxdEbiwarFxbL6ypfGU7lUhGKT91t+nyv6GkbrLKz5kgIdPw7WE6G5nBIH5gJMR/wyHn 5L+yw47wdbsSQPOHQ7lhCeR7euq1ta4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685051003; a=rsa-sha256; cv=none; b=rGkhaTHr9lFiWfl4Y0OFY3UthIG0dLGZwCLq4hyy8iLaKnOFZ+O8OwdHePpkmRAigmOQ29 ERfKE/+u3kD4/tai7Ramokbs2tqgaChJrBwzIVH3JeUng+XFSSjCzsy8lBx7b0C8AeGaXA Zn5pCuy8EplAYKy4oMCQftvtWCFt2WY= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=HGI9nQar; spf=pass (imf13.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 60C9564B6C; 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-Rspamd-Queue-Id: 5D76F2000F X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: z7wnd1arggdtwj6zsza55h1k5nkeuw7x X-HE-Tag: 1685051003-98430 X-HE-Meta: U2FsdGVkX1/9cENUH5AOgo08h9M2knnVFwS/A0M1ttkZ+59qtRQwmClcBz2fDnFl/SOqkbPEK4/9crFJnMSGC9aw0il/gbUH/6gvSRQ1s+BHYXKMqk6RHzkANxYUAiBMc+tPO6FUIxkOoqeu2bawSqTPjKhJSMcQiFD0WiawI8/D4TdR2LcPa8r0e0T+QI8XKO/YAzTVpof9kFESl8WdBPe2LqXQNifZ7b/FgYgWxMM2WSGLmBYoEk+k6Yr5gbicnBAReT/b4yCYJ3VAO6CJ9U7Q3mPfbvqO1zPRsDUh+bQJVvzy5iJqh5USF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ack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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: 13255697 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 43BABC7EE37 for ; Thu, 25 May 2023 21:43:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 038606B0078; Thu, 25 May 2023 17:43:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F28546B007B; Thu, 25 May 2023 17:43:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E3F46900002; Thu, 25 May 2023 17:43:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id D31CB6B0078 for ; Thu, 25 May 2023 17:43:25 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id AAE90160D27 for ; Thu, 25 May 2023 21:43:25 +0000 (UTC) X-FDA: 80830103970.05.32CFF1C Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf05.hostedemail.com (Postfix) with ESMTP id 03DCA10000B for ; Thu, 25 May 2023 21:43:23 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Z1A0tFYg; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf05.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 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=1685051004; 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=K34Y8Ms5l2q08ZJDQpDXu8NAMg3mVVvo34+WffImOq4=; b=irxLmA2nN3MZhDk7YuoGMT1PULjyVc5NSxltmCIsXg+/OJP0xvubQKCyL9vBfzhKC0bDdz rML1lmhDNZol7ZiqB7PzIbw/6758rXUZJQRX1AOWxCt0v0svPKpWP+sgaRkHTd5U2O/TC/ aJ8Zk/WLWtx28CtoAxCV1IsEBRcujuc= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Z1A0tFYg; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf05.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685051004; a=rsa-sha256; cv=none; b=zAu23yc0TraYhYRfQ/hSq6RlOzj9HaJjJIHhYQvDAfAhrorVyLrofb/fFuBQs6i0D0hVQS 9Av/bxs0L6VhUDZkC9Y0k8ORxDJTDq7LSdyG+i1+ij1rtPN9bGw+TDjxmcjwQLEcwuA2He YPEGiWBVNfBsIY/FeXtKU/Rt7O2Q3bo= 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 1B8C164B5E; 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-Rspamd-Queue-Id: 03DCA10000B X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: r6ptzdi8g4wn6e7f1kq1ir9rcon5d6wp X-HE-Tag: 1685051003-78003 X-HE-Meta: U2FsdGVkX1+8ryrcb2iASBUOU6i61GEiATqpq99GSrO2qxLKpuyqxrxy6oCIkoT75tDXjtHtNEYMuM38ZA+5zwWIYLQA/GCqGfUacyluTgIRkixV1ueIHPnL0DcNd8uoMK30NrSoc1k4nG6AfhGcyQ7Y68QRinkgGeTNdoywJh6myL1z6eWh85w26cspEDaaKh62wnwjjSQXSMC0Pi/ldgurSbKs+V7up9PgQyoSAn8k/VpYZ2HVLibgfXypu9gsFnKzKkkPwF4L7/Taqkjk9WblIDnnFM0LJ0Ri3irz7M5Osz/8SWv1idygI8axwwpDbqg8ZxKyExAv142BhJxRX3YUbOcan53JuQg8UYi1OwdBb7+mo9adYzmpO4vTdFJ31OBsR1yH/7laaKJvo/XlyfsyAJrZSX9v+5Rz1xexfWzh1CMGbS/jxMq5uBizt3nchozPvox7heQRg87GC3q+0jL8ddf+GADuHg20XjsBcFusMv5d8vlSuIP0TFjc/8e1l5rONTvKrB5GmpUE5kufLafo0JcwjDHQgqVPCaE8q/Nax4CFS9Bqmhn27SluGlMiz7qg8oGgj1S3AtaiXN4BHqACKXEe3VS/Po5OETeqhvy5EzukPGUjQ6/oBUwNml4kUg8y13zYsCFY67BkJZEjsnlhjZ7Sl5R+aGbFgqGMZajjKn9F0dKpRQKP03ffCriuy5mDPcGkIqd6BY1LmM+Qf38ZQNfqfQwpTRqvcLSs7UImk1Qupe/WSYBExLs+yZdz7FP3AF9ovSxquilzpcb46yHmYRfjX2eVCemBZMSpyHFsja6jGHpSVdpddOWzPAQLKltjp8a62gv/LXttQAcK+ACBl8OlvvmV9MJoJwuzT1CiWzyYx+2j2YL/0WirwwUWtUWwBwhBywIk93QqdkW8MzqexNhGz1Dj/5Y+jJ5tIfoacqL+D1veR+7wBur9xHvjsLvsXj2H6wle/wPBV/C bGcnJHwT 8AkxXeb8xztvc3UnV8h1qfp/TvbuVm7cLwqNN2LcE+l/35+9LAebNHoImR38RaMJBMwWIv7CRv6zmet7oykkGvjvaXPD0+P/Vba67D0NXE4VElbDaQzyuR3A3em75oWOH7hKdntId3bjWzReN4NnBi2fdNq+4PMsMj0CWdttnXKX3/fDH7GVwd2KhYjeOMMJcuB+Op5+eR3pztAOxups9aqVdtdua6mzkdFVXgIHJFu2PPqIjPisTFbAW2Iz3i4VK3Hz14cMAHeDyYrQYcNKdqvZ5Lplnf1qPc0ty681PySUrUwPHTm2Fp0AXk9jo27eH384P/92qPXN6/GROt31nFvsV3Q== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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: 13255699 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 79395C7EE29 for ; Thu, 25 May 2023 21:43:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 28061900003; Thu, 25 May 2023 17:43:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 20B19900002; Thu, 25 May 2023 17:43:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0354A900003; Thu, 25 May 2023 17:43:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id D852A900002 for ; Thu, 25 May 2023 17:43:26 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 98E39C05BC for ; Thu, 25 May 2023 21:43:26 +0000 (UTC) X-FDA: 80830104012.26.D27AD5F Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf14.hostedemail.com (Postfix) with ESMTP id B2C29100011 for ; Thu, 25 May 2023 21:43:24 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=HMEhL3qQ; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf14.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685051004; a=rsa-sha256; cv=none; b=y43TaJ3Kco0pUZVMlN2VgztH7rwjBHizUBtU9YWfKXYmM1hJoJ10rODd/OsjR9/lZ6iBng xX30nNIQe1j5xgvv9QLYS3GJroIruRg/MpJPuCXXC4o89Z1l5zfYjTHSznjvTuLa95PU+/ TJa9eJOxQT66SU13UVs3pPuzDQ504iQ= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=HMEhL3qQ; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf14.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 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=1685051004; 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=LlxKsvSOUXUuc/6VjlqHU58JIVzwlKNwUJ+uGxjs7YU=; b=GsgHI0xn8b+FE4h4svgP4TntS7vQk4I+Lj8qiMkHkLZ9ynhY1QWjZNhOcWrwsUTHYjyHk8 1UQxMqUpZry1ZoJsoZwhi/6fEtzDaONmI/q9GM8OE2K36mD57QDTBehH5DiMWpJnZ/MMcC iokJYAGnkCyjDGrlHs8CpTvuXhgDNA4= 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 C8A6A64B77; 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-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: B2C29100011 X-Stat-Signature: dw57j1x8ek4mcek1awm73qt4srr6zhjs X-HE-Tag: 1685051004-181302 X-HE-Meta: U2FsdGVkX1/pI5jg9spSzVoFhGeFGwo3Z5Hi3rrAe0TCwV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QmwFQNi6sr4rnRLCszBIQG79t/YdNoU8xYmG+8LH1Kp9JJon/4q1WL6kLjPUgeKCceo719ee+YfmbZZgmaYIwNXmp3uXm2QaEZacvcxcpTPapM7ROVthOaKYNHm87XFg8I3yd+nMVttMFopfwqWlUqiQubQsCYieqHFWJECWSMZALR5Ujy7UhFjfyZHpXnGTyQMZvKrd1cBg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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: 13255700 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35462C7EE31 for ; Thu, 25 May 2023 21:43:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E1A2D900005; Thu, 25 May 2023 17:43:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D7CAD900002; Thu, 25 May 2023 17:43:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C4713900005; Thu, 25 May 2023 17:43:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A4CC1900002 for ; Thu, 25 May 2023 17:43:28 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 99AC9120599 for ; Thu, 25 May 2023 21:43:27 +0000 (UTC) X-FDA: 80830104054.17.EFDB7D4 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf20.hostedemail.com (Postfix) with ESMTP id E41031C0012 for ; Thu, 25 May 2023 21:43:25 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Sm66ncKT; spf=pass (imf20.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685051006; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=KqRxbCs+J27XJMw5KzsHVElKU/myUVwjo5O0H/2W2W0=; b=wScjKzYhclf1dLSAqieNAplosxkujgHVTEN3nDo2Cgedgp6G+uh8jJc2WpJl5dvOZT38Qc wFSzJ1xTrZVJ7KiGqDhE+BAEJHo6UXz4SyEmu5etQkeCWauLtpSZMsr0Q66fkVkEhhyDnz TGCn+YthEYd4S4SW1kqNZXZR8PQP6Vw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685051006; a=rsa-sha256; cv=none; b=4BnkTOtclJknnS72x5bHfTymhGmlswDfSmOuSMKDelRxWzc0osngp9Gsso6tJAV5lrcLeG HxXCtE9J/Zt87d9Tr4BVoTYNp3rFS9TM28Gi1g0o0qo5aM6zygPf+m9tmvLk0BEMNNgfmV a2E9xVhTq+mIvXkLy0bipeRgU1wqkb8= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Sm66ncKT; spf=pass (imf20.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0DD5064B74; Thu, 25 May 2023 21:43:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FC00C433EF; Thu, 25 May 2023 21:43:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685051004; bh=GDYnOCmR9taeLPi11qkRjJOP5JKJ+SKnVQLPWS9novo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sm66ncKTjd+QyK0/mKdZ2zUyUEX/24G5aM3/NnaMM53ZqmMolOjDQdXnpxWvXkPrZ xVdPCE2X+IQA/H5pnFnmzbre0Yi4CuEg6MvoI1KuC4N/YdmtpKGqDH54/x9qKPRBl2 C3aiKztWzNc62p9d9ceWUBmoiZbFZHmt+kQ3Z2qhmL0zkZbtm9SV+DewauTDlp7SL4 sIKnTVcDThUbT2aFIP+9Mi2A5QLIPCcKLz2fyJs/mxe/XkVozkH77Xf8NZ8VZRUF13 Zik9/tM+ygV+5FwhARYsu/xmcOjgGc0MA0bPW5scFNE4SBfH+y+vaIjdtUPz9bF+Q8 6iD6bMZ2wuNFA== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , Jonathan Corbet , damon@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/10] Docs/mm/damon/design: update the layout based on the layers Date: Thu, 25 May 2023 21:43:08 +0000 Message-Id: <20230525214314.5204-5-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230525214314.5204-1-sj@kernel.org> References: <20230525214314.5204-1-sj@kernel.org> MIME-Version: 1.0 X-Stat-Signature: eai3tywpw35kcnbn11udxwgudau9fsmp X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: E41031C0012 X-Rspam-User: X-HE-Tag: 1685051005-208435 X-HE-Meta: U2FsdGVkX19WLG5XSg/axF9NSYmazew48gSxz4kLkYFeyN/OYG++dBeDWJ3Cd+RUplOlGQrGESm8A7qALENVmO/VcM/WkSK4of+/cpBi9sAGpFwkvYrWSrk+MCTMPwVry49mMA0YgoEIFPwz6tw3TVY/Pxmo/5FPVMdTD8HxNE2Ur0OyYsForBxh/eHNuvdKotWFGx9W/nJY9E8AT7F19LukJ6sOwLVIohl8cpDM/WYKRWHlvnHWcsSmsL4/KzgHUn5OWC+a3yKOb4dnz4++rPCsJ7pCE+TCP9NOJ4CdZP/P/SyjmWcy5UnS+bYb0aJ0lVfML8nh5GH8m1Ty+4/FiBce39gX4ch18n4vdw9oiLTc1qzIh7o0ch1e4tQK2EszVl4dSk8ABUBQHcFyUaY3kkLlXSFzNYzMq5ZFxCw7dDXpwotDa4ThqfcjNuTv9LIg7wzN11EWwVFnPUTnZjSZdVfV0mHQAtNv5yWn1qzOmVFjvlDGx4lseHAb1m3SAg3yLkQcztbeMTeSA8qsSKP2MjBNdGnqqFcmH0z8MmKnA3H5S3g+b6VOcmSioToi29E1jdONIhDK03ha6jik+fOAm8TPi9p2Kie1H2AACbPS0SJSkLDydylvqhdMXN7wFbR/F5YIlrm4zn/Us8giPvg31+tCO2kZxTcdRWAwirip5TIzZ+Bc/UwlIfkqJ4RnF9J7xAips1HX3NkvkxDHVRNb77OvzbbvIR9GbJP3TDYL43m5xIpLVFQ6bOdYnsiRNkp2KYiRAgoqFYSiGbREBkA/E0HppzCeFeM9DE9YZixiuQeysGyPxKapDsPHW1XP2c/50B56Ieb2/mdE2mIJhkkHiq0PT2sdI7M05jiEimVm5zabi2IbbirTUnysWhZNmejJwmGoT8R00UooxM+iaWjrGXK/dwcE+bjtTSEZJcWhQVeXfyJcRxv+1l64ANXJpP3pAq9lMcXcAKmIqwScKIo NSaafmrT Kz719NTIG8VCrduBB6s5PB+DMsfKw/njv03Wkc1o2/odZQWpiHfpWlgIhpfxGEZRf/znW6/b36ppnyh8sXnlW4WBYgsMHF8rqsSTWDRHcWuDXrqHADIswls4yOiSeffZNIHcq2SgkjhScZCvo9ghHFF/U6ETg/wNpW+CqCUxEEXhYKuQj8mOm2GLxXbTDnI33NajQe0Cey2oerFZgeoV4SkRYdVI8008kBRcayweNsp9nS7p7oPD/ihAwCwBw/260rhOSpHbaZhYjyi/uggvxAVmaJ6cloEM/Dp/ZLKQxYJFqaZF3b1imcdJ4rvJStrfendCWRDIjikM3KIbOG41GcdNjaQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: DAMON design document is describing only the operations set layer and monitoring part of the core logic. Update the layout based on the DAMON's layers, so that more parts of DAMON including DAMOS core logic and DAMON modules can easily be added. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst index 3b4ce873fa71..eaf52f3a9144 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -19,8 +19,8 @@ DAMON subsystem is configured with three layers including interfaces for the user space, on top of the core layer. -Configurable Layers -=================== +Configurable Operations Set +--------------------------- DAMON provides data access monitoring functionality while making the accuracy and the overhead controllable. The fundamental access monitorings require @@ -42,8 +42,8 @@ Also, if some architectures or devices support special optimized access check primitives, those will be easily configurable. -Reference Implementations of Address Space Specific Monitoring Operations -========================================================================= +Operations Set Layer +==================== The monitoring operations are defined in two parts: @@ -105,8 +105,12 @@ conflict with the reclaim logic using ``PG_idle`` and ``PG_young`` page flags, as Idle page tracking does. -Address Space Independent Core Mechanisms -========================================= +Core Logics +=========== + + +Monitoring +---------- Below four sections describe each of the DAMON core mechanisms and the five monitoring attributes, ``sampling interval``, ``aggregation interval``, @@ -115,7 +119,7 @@ regions``. Access Frequency Monitoring ---------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~ The output of DAMON says what pages are how frequently accessed for a given duration. The resolution of the access frequency is controlled by setting @@ -142,7 +146,7 @@ size of the target workload grows. Region Based Sampling ---------------------- +~~~~~~~~~~~~~~~~~~~~~ To avoid the unbounded increase of the overhead, DAMON groups adjacent pages that assumed to have the same access frequencies into a region. As long as the @@ -159,7 +163,7 @@ assumption is not guaranteed. Adaptive Regions Adjustment ---------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~ Even somehow the initial monitoring target regions are well constructed to fulfill the assumption (pages in same region have similar access frequencies), @@ -178,7 +182,7 @@ keeping the bounds users set for their trade-off. Dynamic Target Space Updates Handling -------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The monitoring target address range could dynamically changed. For example, virtual memory could be dynamically mapped and unmapped. Physical memory could 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: 13255698 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 AF125C7EE2F for ; Thu, 25 May 2023 21:43:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 40867900004; Thu, 25 May 2023 17:43:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3B6D9900002; Thu, 25 May 2023 17:43:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 209CD900004; Thu, 25 May 2023 17:43:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 0D09A900002 for ; Thu, 25 May 2023 17:43:28 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id DFF6B80AE6 for ; Thu, 25 May 2023 21:43:27 +0000 (UTC) X-FDA: 80830104054.15.4847926 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf29.hostedemail.com (Postfix) with ESMTP id 8BFD5120014 for ; Thu, 25 May 2023 21:43:25 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ZRtNgrzl; spf=pass (imf29.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685051006; a=rsa-sha256; cv=none; b=xqB70JIO7/xxjQLv9XRbtrx1WBl6pZZ+NXVI+4FsRxBGwpo1Qmtim9+2EIeSlFTRwEjSuy FZiWnvPZ2UThxEGJ3rYMqWxLTMqXhhCT6zNzJq16cH/b9Y3UOX7/VeiXad7FWgtYgEz3dR tmK3/I8lIatTVz8oeC+QIUoQ8PZC190= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ZRtNgrzl; spf=pass (imf29.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685051006; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=kVj9MGetKxz20CAAyMJ+u5vcrf5oTJJGhw5moEiDoaY=; b=7FuPtwUpw4dT2yGav3z8CldJFa5ukSSMuWN/aOE4Gt2V308QkcjFnYuxl+tbiQ+He2myyV TBY+GRHicnSFPDD1/jda8Xt+nsR9WntMg6tJQ5WxvZx5sr1H9+LURPHKMJSEb0rqZp6sZW cn9H+nUfG/KnzACArVll3CUs8bccJso= 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 4863B64B66; 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-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 8BFD5120014 X-Stat-Signature: bp1emkwrrfujrccfeesy9tat6ruf58xz X-Rspam-User: X-HE-Tag: 1685051005-636847 X-HE-Meta: U2FsdGVkX1/U1Z4Li+g3jbDS2Erjlwu+n9hlOu1REVygdnv0j3eO++bbzrkkFaTVv63cOoHmR3kNDwyGWJDfRlcXel1qq2Wo/uTcZ3/jZfm9F7uo6uSt87jEQ918DUuh7bMBKampSwq84iKIvF8QFjKCAoJz0ZpDm2pDLT4mGTdD69DzzryxQaATL5gVtOz6VYoeoCIxEH6XeI1sBUh89O/PgU6QNMYXM50m8X6mVWjuUPIb0WVUVJPjXgPRrAjI6wF/ebIo8FccWBJFna2gwliUJNkzsl/Bo0cCHeioV2U+2PS/C59NXd3FpBWDuwCn09FiLQTQHo8AlbYQ1LWSHNj48tqD63vhcdu5Fz6lixR9TlpDwKnJzeZBpG/jgUXtJRXUFCp2EuP4MunOClllT4oINMlgxVDQnp+O96JwIMy0t0lyqi7qR3bylpGrWpDUxuVRFT3mC031TT7Sha+u9JbwcPC7+JGKu3leMIH43f1RXZvR1BZCllzv/sQScbKg/xt9ssg+r1DBR0L0JYi1mJRiNNwpspkiwdXxgrjOsck81MAJDDHczWAaxar9WL6it76gwGL9PZecfBUM/tsloAPo3xrawQu8qkP5+uiOY786X7wLdMPNwkmgoF0C4CVItW1ZQeuTEhl/f1Vkd0TGkpxQPKjrfwe3SUdYIpCsAtm/LM9gWmcgnKy0/z3y8kR0N8xfBxCSK8wekRsO3AW4ukeJiiLtlU1k764co5eESTSo4NyY7avYTw93DscCrpQChl1gNd3s8f1/havGE2hPsKy9JPZklZ6SN/0s/0tXHUx/eOBT9KPmALjE8wY6kNZVNolVcp1y572GSXEcvLHbT53/a7XLN3mRwF0EQqWj4IIo2Q+4eTHDW6XD+I4ftwfFv4r96Rc5znt2Ef+14fsdvsQKb9Gl1CWtIz0ULzOrtMHyaw/X+2rMv3zOAVVnrTCp5KIQin2ipRmTbzX/5t/ +JEPlX+5 8DHi4RB7Ym7NPpNLPsYvRuELK8ukIgkMji3YTPsp8wS7pujhXPQADnfJ4FH4GGMpMes7Xp+zKuGhnukH4S11WLMiJclYuvxWjkWTNbBab1kZYx4EKdDCsauQ+oP3lxXZjOn3OfSFLfr61yLvIa5Lhsi4zYcNou4/0jUNakhKPIx6yawnIcbNjtpwaJUKBRA88mmORvEiqSYJLxN57+OLWtXnLdrEXTQsjt+GAAXcuh63VShyYE+qkMEhBA+tIBIl5H2/mjmAWE5S64cHR8bVhL3EoTttuXJ7W5HNxArS2RzvrDbCnHp8cv9RdeRSS7+bpb51WQ1+qUoDKo8iaPElDrTFYIA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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: 13255701 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 8889FC77B7E for ; Thu, 25 May 2023 21:43:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 42E77900002; Thu, 25 May 2023 17:43:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3DF11900006; Thu, 25 May 2023 17:43:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 232CA900002; Thu, 25 May 2023 17:43:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 07935900006 for ; Thu, 25 May 2023 17:43:29 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 89BBE140712 for ; Thu, 25 May 2023 21:43:28 +0000 (UTC) X-FDA: 80830104096.15.6F49570 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf15.hostedemail.com (Postfix) with ESMTP id E70F2A0007 for ; Thu, 25 May 2023 21:43:26 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=m66zBEyU; spf=pass (imf15.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685051007; 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=4azbihuw5xeIghnL2EFrrkWz3xRoWcMEXyumEeCz05E=; b=hBx5XbNy0im/qzk58phHpYiO2txWAyLwlwlvx3udr4vbqa0LPX+C1vYOSAXkOZNMD0PTiQ YCdSOnqmzJyfC/Oy9VdmeiF/+Z9WP3Ln7O7GRCiScEz4kJEmdEd3vaMAaQ9OCYq2EXH/GH igPOhYVt4hC1urlT7gllnxkHHwZ2uAI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685051007; a=rsa-sha256; cv=none; b=RipX2Czphx82R84Ex6BT29GuSmJEb+nvJnW9JJKrp6S0F4u+G6JiEbLzAFVoGP1dubD67O QMCxB6mj+6lRjKtXLWj1BGYLMEooEexc5XIBtBicT7sdWSzvyn4sUTrcM/NJSU9uXAK641 evt6j1aKgNivLZy8KfNMDu8/1XOZdHY= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=m66zBEyU; spf=pass (imf15.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F18DE64B72; 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-Stat-Signature: s7npgoijobkpmdttsawu88eyoke93qds X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: E70F2A0007 X-Rspam-User: X-HE-Tag: 1685051006-483259 X-HE-Meta: U2FsdGVkX1+kyvAIMQOU1H6vTqgcRVOxA+hAR3ekMy9exOyG0SGFHA8g47as9no1EsNKt/vaMS5H9f3eCV7GzCZvUMqf3rxlsyhx3BdfxuZYmpYNJyE/lhE4ojWAdUp7XMxfCRLaDBK9OXB+VmOLk0xKgbalfx8cru7bzIvFBJsfFcbYMBAHNDgyTkaEN/RYVUIq3rn/hIRM0O2pqeZk0SjZ4TXwY596Ou6m1dzePfArGPyIUsDvkKVJHbSosmSVZE+r+nv3h0D4prYFct1ftS6/inh8Wl2cT9aeClXtsoFolvEi/0nnNU9hC+f93+qFk1FYUmca2M+HiPB1HmCooCz8Rioe2U8uzD1h5fKzQEA1z/NHDdDsJPCvn8lPxpT0Pxb4h1TPSo9MGmdHpK+yoJMr4V+OrzuIyovTmXvu/8pYKJirsRPsWM9PyCUiH4J6ddha9fGYEZgBLDxCm6MbiVy4GRRt1qmpCaJuoBGRw7gbzd+yQ2Bcu6QlNjGTXa+fmZSbi9XGA6KF39y7kr0o/NipxH65swWqvmuzNnCmMUBJPLqwkVP1jQPWCXSuhkPQTudfVCMbKuXXnCznMihGXQ3yidZNC0Yw6Z3/x/DkqDs/35/fSlA6HMGtvBXdrMZ29MlJsatw/NkeFgyOYYz7Ji9FWhpn/Un4I6rldSzjhwx6t74iT3yRp7Uv7hUepmHznXnNLSSpylAnyjpvAnOrSLD4GnQhSGxY/YiIEsjdDKTUfbELnDm6PE1ThJ/JHBAjP31EbHJUwccAs4li7INWtB28hLHmjYyBAUor+zMDOHWIF3nBGWXS9V7ps+iTKGzFqtrxLe+KSDtpN502w51/pYvHjGzR0a/OAzA94cq9KurtkuBMGOu8lh4NwkQrj7bU4IZOJfgpSFBkERXt4Psyz9fpnoB9aooU1bhXWwgpUiiT6i3C/KU7ldCC4AUCpHApr3yhCul6AMmCf57cgZ7 4Pz37OAa RJK1VUzVTodsalCI46mhhIhIYSh+7xJ3dwhGHA7IwPjAExaE9IieMmnrQOa0tdt7xKlipPi7VUO3j4qRP8R9i1Bld6bbzZNVEW+Z7Bvu62Qv8ED5VfVy6VpMJD/WnewYc3fTyzvnfB9q9eoFMgzSwQlZ0el7YKioJl6tzFF34yZ9ryWZt5H3z1wASGNn5h+cPhTUr5lY+FKIP3Yq1yqlylOvSreBFtquOcWzpUZDzD9MuiqxMeEZ7Hmhz7RPYdAqJTHMi0O2ewN5Kl/CceCs0xv2uSWP6OJqmP02OJ5sooppOiRIGeYoR+mTIDgZhm7ZhBaEytHWTB3393rSgOdUuXn1QPA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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: 13255702 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 B3EEAC7EE2C for ; Thu, 25 May 2023 21:43:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C1FF3900008; Thu, 25 May 2023 17:43:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B82B9900006; Thu, 25 May 2023 17:43:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A49F9900008; Thu, 25 May 2023 17:43:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 8AFFC900006 for ; Thu, 25 May 2023 17:43:29 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 52D2540B95 for ; Thu, 25 May 2023 21:43:29 +0000 (UTC) X-FDA: 80830104138.08.EAD3103 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf07.hostedemail.com (Postfix) with ESMTP id 79F3140010 for ; Thu, 25 May 2023 21:43:26 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=nzbBk6KC; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685051007; a=rsa-sha256; cv=none; b=LLKx/wBnZx0yqEWKsePt1hAmkkF6e9Oc2MY3bbXzo5l4+VPAdQM1yNR1JdrKocedqdC9fz nr2VJF5hOGppxRnolM9q6aaQ6io4nREoMJvTb+m2eQDKfCwy0P9D44b2bctWjfTLzoNseH sZyUy5A0/vi515iaR4cFhJFCQvSTWws= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=nzbBk6KC; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 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=1685051007; 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=I6GWwUgfbn7yeMpa/l9FEN4Tg3PHGkeps/QvA310OWs=; b=j3SfPmJHcLn9eS/8OCsSGU/5ibpguED38giFZQ+I6dXIej1DVeDC31gcv4KTS0l4/IuYgX 3mLumxqDCSi8F/qy8wmNbFR3udBPWveV74KKffiGtrD0u8jia7p5Qh7F7kyghMVIEKFU4v AAqgXPQ0ER6mRQOTMApgvD4XoCr503U= 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 B72E564B71; 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-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 79F3140010 X-Stat-Signature: hucs7nioghqua6yxiggyw5fy7mx8msf9 X-HE-Tag: 1685051006-360252 X-HE-Meta: U2FsdGVkX1/9JVrWkMP2uhQKQiBcK6l9Z81kEVqox2NYlP2IZDB3oFm8m18K2vowMvXXCinuzV2ONFYu3ximjcKr9sH0HD1SJn5x0PkPqyMBfYfOzNTcSDOrl48kruAL1Y0xp3WwcLXjPlyZfUq2jOcaX9I9E0F7zloMpcgp6v3egXe3TrVt7n2JpVx/Dnn3rrSllITVLbXljplPljuCgmgsEo3y7Pdj9EYnEUDSrukhRV++d7JjMOZfNbRoYNDEzHMA4mzurga5mybvURficIUEHPwiEvXJERv5DbLD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=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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: 13255703 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 42197C7EE2F for ; Thu, 25 May 2023 21:43:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 01098900007; Thu, 25 May 2023 17:43:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F02CA900006; Thu, 25 May 2023 17:43:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C1F15900007; Thu, 25 May 2023 17:43:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 9B7ED900007 for ; Thu, 25 May 2023 17:43:29 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 741B540D66 for ; Thu, 25 May 2023 21:43:29 +0000 (UTC) X-FDA: 80830104138.08.DE16D7B Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf20.hostedemail.com (Postfix) with ESMTP id B26D51C0012 for ; Thu, 25 May 2023 21:43:27 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=hyX8pFa7; spf=pass (imf20.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685051007; 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=1bpl8Yfo5pgzplMslR4GuMy14UBS+T1/lk8+x+aio/s=; b=e+lPLwfAyAWIE8GtBsbjXik2oCWPoB+IQpS5XJPIgHYKoIMJfHOL2r/urNxLNfHylGcdng a+yNBGVcsvgGMWk9HnGp3EgkOurmCqyoYn2y51UBJyHNiOMpDiS4noCRPnfmzc1Cna/HAo KU5PSMRzMICCY/7l8HY81/gtOWz9lJU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685051007; a=rsa-sha256; cv=none; b=mmDeyoghuiVsAck1Hx8jxy9/C3U7I4t673xFUYgxBnWF3SKS/gfIksKqSKUDMKJ9w0zM50 UnaXzX8Rop6JMzyAwa8KA+VCQUWpPuwdFYYvH7NUskyF2uCyBbieCoMsgU2MVqGG2TL/iq JT9czvjOQJrldsqI9LYh6+3hFGxuPkw= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=hyX8pFa7; spf=pass (imf20.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 775E164B64; 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-Stat-Signature: f4zn1e4z4daxwqupijox8n9uox5qckqi X-Rspamd-Server: rspam10 X-Rspamd-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WDrpWObDU/ISlzK9Ko/jaaF0pswFhkveZ4ijGTZpBmYZY3ShFtnPlOk2sxA8fWrhsHMj8Od/xxRGOIKBQjGh4A3sAVeijQT7UO5eCcDrkCGoNNMqHHqOSx+WKfprN1mN2YDXpV4TvCnY8HLf+7ohG/RJJnng3rI8QijnZ0k6CFX2El7OkoeFccHXTsJqV5g+kRYsHkVV4iWlgeXHY5UNv76STXM5wffVc+lh9rdU0m70wLPOI6fkjOngljhzbL4nncr4izLIA6/a0s9P8hiHE/2adb3BjB1q0AbDndqWssxposji8Dm25e6k9kVzRkxosQA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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: 13255704 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 D6E7EC7EE29 for ; Thu, 25 May 2023 21:43:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E772890000A; Thu, 25 May 2023 17:43:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E188C900009; Thu, 25 May 2023 17:43:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C958D90000A; Thu, 25 May 2023 17:43:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id AF4FA900006 for ; Thu, 25 May 2023 17:43:30 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 8843D1A0671 for ; Thu, 25 May 2023 21:43:30 +0000 (UTC) X-FDA: 80830104180.28.EF2238A Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf15.hostedemail.com (Postfix) with ESMTP id F35D8A0008 for ; Thu, 25 May 2023 21:43:28 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=nUwAJi3+; spf=pass (imf15.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685051009; 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=EHFw/0bbYxWESWQzXcxnUDPytC/XadxJBBIMogJ9w8Q=; b=2pxN2TXIajbkmWqTf50cHVKn+47l0Zez5gE6flwflUi07wXkw6x8quAm91vPunpF1cSmPM Qb/zd2HYNqsB0b/kBxLq7K+u4cSMTEhICyn8xfUTk4NZMTN7sR1JIlYVo8lbKQZM1M6OUb OHQG1RV1tXUjnCvqWuqEK1aSj1Krf+4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685051009; a=rsa-sha256; cv=none; b=gzQdof78tbHfHoEalIbwQEnvcQtrJV9BRbG879PNalka484z0JqS45SF0W1RYRRDjp2WA7 kwqu1XIUs8I28WUvFxIDdOz17bEkkY/mHNY0Y4pgSjDe1BlbdvvS4yFm+UgX6Uk/kgOzND /uJ5Ui1IEH6rr3CFFakCLz8PfCNBvSQ= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=nUwAJi3+; spf=pass (imf15.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AB38264B74; 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-Stat-Signature: 51wwye8ff1f59eh4h5xqc3qn8d7pbxun X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: F35D8A0008 X-Rspam-User: X-HE-Tag: 1685051008-196890 X-HE-Meta: U2FsdGVkX19LuFhrwCKKMA1fU53eP6YOKvWi11tUMVqNo/i9MUc/L0v0+j/Ozj0scNRjuqXcljgoai01ls/nteGjDX/h/PG45X3uugb+cvIOkWfbHSA9FPuPAWJU3l9SPrQGAnDdsjeTGCN5yA1M5aTjf3gmIbynvLPadAEDFysIZ7eftMKHlfoSj36ocN6gaD6mFmjVnHtF/jEv49GkT5/uEj4UJBXeIujzveDU+pUm/qEvNEUje4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t0/eCqyFjyJqZaeOppA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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: 13255705 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 0A3C2C7EE2F for ; Thu, 25 May 2023 21:43:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 15BA3900006; Thu, 25 May 2023 17:43:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0F7EB90000B; Thu, 25 May 2023 17:43:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D55C2900006; Thu, 25 May 2023 17:43:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id C02AD900009 for ; Thu, 25 May 2023 17:43:30 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 8A3D61A0CD2 for ; Thu, 25 May 2023 21:43:30 +0000 (UTC) X-FDA: 80830104180.29.4A49B19 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf29.hostedemail.com (Postfix) with ESMTP id 42BE0120013 for ; Thu, 25 May 2023 21:43:28 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=oQoq8UhP; spf=pass (imf29.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685051008; a=rsa-sha256; cv=none; b=Dv+4y3UkzYiw0eV+aNdMbpCN2xX97kIqdZEmARmNfZDHK7TUp9CWrtHjSpk5kK364qm0cz VpJnCm13h4WENX9ymLWIUgPdn52HUMGhPbTH7xpvLH4yH5oBknQQXD5cGuSVvOd654fWfw sPAhBHXTbP5GALKzIdumPwOWcR5TRwU= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=oQoq8UhP; spf=pass (imf29.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685051008; 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=C8HK/wu9JHzuMNBAUGD9ZvBrx/8Nv6JG92qxVoJ3sNo=; b=nrvxJYtWVXih91IlPwL3La4dXSPXiiwLuavMDz/HHOsKRqgA8NHSOfQi4Yw9uG/8B2nL/k 0b6e0HIYWOUo/6BOL9gcTjppjTKeGU8o5jWgtmqrmFJuNVaJKbDbNuuRhnVZz3IIWNsvRj /I8XXH5rxnV8f4zPmpVQtUrJ9DbDRMU= 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 8142464B66; 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-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 42BE0120013 X-Stat-Signature: 6rbhhc5fgxhofhtjuwgdcuk5qw156qiq X-Rspam-User: X-HE-Tag: 1685051008-530507 X-HE-Meta: U2FsdGVkX1/Z+Wo7ONdDMDT0gV32k7Z8LWvpN2KfCxrkP5wBPmA6W0Cu7TAdu4iO1/S0IO+piDadB+c/c0IRjJmMjFtPzo65Jj9y6qY0/kmG0AHTYVEzIqmziZMvpUEbUcMUmOA1c+0Xe3Vtjfeb3iDDRiO+rozWQt7GlEFeefg7R3+KIqog9m03oUGCH12bMbp6W8UxWQVL8LnOrJxPZ+iwSKT3rmBK47wcoCM7IN1+Z881LJXSbOCpV85N4Mz6aQjalLxVsOb4vTy1gwD8RxW/3bSSufhHg1LjPX21E0DWjG2SNNoXhqaIIsOZU0CeGNYRj1heRML9EgkINDyB3vN6DvnhY4n+KY4ZAaGK+73JEvFiq4b/3us4cVWnX5SIHTFCZuDunin8Cuo1kfLzyA8Fe3PU1/v++BsIjtWn+DkmEHaOCnBQ+a8TFsbkMTpBe07FFYQabYjJqvUIOo+IyUK48XZ0XaC6GuUlzxQ8tdGo/bHQY7RCKyGfk9zAtlzbqMrkp6uwLoNCCcaqimGbjTCdUqyFnqdXMoHe/pvFE2pKimR4UwshqTu0VhIHJZdAfCruNcPmid6cB4V8eHTRjK19Bua8yeesI0aHvq1Glc8ELnk7xc1N0SsXcu3WPP94blgQfVLFtYJbD26J0sexnbje/8UmvY6+szDiVqXz/CQFTYSGOh3SaJMCEOJORNDn97mmoEE8y8FmSeHoyBUgSpPa7+IU0AgcZQVkM049fpb6nu5j+s3sJvmGHSq0FyWitUkeY9+YceJoAPysBdFIut/ESkNT9gg3XsE/Rez6QVpc7SfYF10UYOB0eS15COgbq8ozPfCSwBLccM/FVAIczdc4TsLLY2j9KVmE/hZktdVXpVYRncr68sCZkH5uIAHO9kZVJkbyOt+YItUtwAjLIW7rH2eTe2F+PPB4VBx8POOlxhmABIljUireJHijH5J5hOvRN9+m21izvuJRTfS 2KJ6Lx8/ 1mF0Jt3YxC4CvXbN1CKvB3vKFQxwPjbnn0u9ok5P6hYOSHT+7M7GNhj/ThxbB5FEfPSHAK94NwZcznSHE+2MQDDTMIj241b0zbNdynn2NXdBfz4thdKGHMZGie8nwRDnVQO2I/5r6Zy86IXQJ6DUD5cZEkcSdTt0vvAc7OM0/BiBImFg8pvcER/FOqpd79KVOOSfH/NJWKwMTf9nM7G/Gw3/lOqDaak1IyCh1gxJIFSdSWI9cFdxeUPt1lzbTCyCf9S0nlwAddbEhR+aao1ZkLkwPME5eVR6OZ6AuT43AkP8LQtIdYsPsjp2+gDEZOO8ehm4itQpQ3aj9PT2BpTE3RitO9TSDBh2ZLJCM7aA1yQ2ogutJr25Uo0YVPe2PRCy27zjt5ihXaJTr/XNsfquFc7mj8ifgeOj5FUS2G6qis2NjdjvqeT+D6qSukwLoOFHt1at0Oajofa7T+Zz7VmneTPTV/EmMv1zlJySr X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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`).