Message ID | 20220429160606.127307-1-sj@kernel.org (mailing list archive) |
---|---|
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 5DFE5C433F5 for <linux-mm@archiver.kernel.org>; Fri, 29 Apr 2022 16:06:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C0F836B0078; Fri, 29 Apr 2022 12:06:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B98266B007B; Fri, 29 Apr 2022 12:06:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A619D6B007D; Fri, 29 Apr 2022 12:06:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 983096B0078 for <linux-mm@kvack.org>; Fri, 29 Apr 2022 12:06:18 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 6738160A28 for <linux-mm@kvack.org>; Fri, 29 Apr 2022 16:06:18 +0000 (UTC) X-FDA: 79410393636.21.221AF44 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf28.hostedemail.com (Postfix) with ESMTP id 2CD77C0044 for <linux-mm@kvack.org>; Fri, 29 Apr 2022 16:06:08 +0000 (UTC) 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 ams.source.kernel.org (Postfix) with ESMTPS id 3EA6CB83643; Fri, 29 Apr 2022 16:06:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86FFEC385A4; Fri, 29 Apr 2022 16:06:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651248375; bh=kX9wsxrQF5lo48sgREIAhlQjmVHS6gEUXUOxmfhc2II=; h=From:To:Cc:Subject:Date:From; b=YTO3+Oe23DUpJby3UQFt6WQjolYvkbKIlw89mqrhDDdaCVv4nwL6QFV3oWJRed/8s 9EEDmRuXfUL172NyzyO1UdvIHu/6yktJrRYik3aUFb09BKWT0+8XypBwx6NZOILOEP OHf55HbePzWVybtM/jiQKMZQBUiAkM4/oXmKGnfFf0lzAfA7YNYkcbOEl6ZSxEayJ2 29GKZkA5/KccwgKjg26flvFuBN5+0ApmWsaOSCsIvRtbfZRIcjjNAP+ElbXLsJwggr eRWMjgXul/LAbJeREhtZlZobSG3YpcILygXUwak783ccmhyIDr0i9rFBVHF5Cr3+eb tnUywfvPBOpYw== From: sj@kernel.org To: akpm@linux-foundation.org Cc: linux-damon@amazon.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, SeongJae Park <sj@kernel.org> Subject: [PATCH 00/14] mm/damon: Support online tuning Date: Fri, 29 Apr 2022 16:05:52 +0000 Message-Id: <20220429160606.127307-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=YTO3+Oe2; spf=pass (imf28.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspam-User: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 2CD77C0044 X-Stat-Signature: rs73re1r3tra945jnrdmbrbyun8gwxhu X-HE-Tag: 1651248368-776555 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: <linux-mm.kvack.org> |
Series |
mm/damon: Support online tuning
|
expand
|
From: SeongJae Park <sj@kernel.org> Effects of DAMON and DAMON-based Operation Schemes highly depends on the configurations. Wrong configurations could even result in unexpected efficiency degradations. For finding a best configuration, repeating incremental configuration changes and results measurements, in other words, online tuning, could be helpful. Nevertheless, DAMON kernel API supports only restrictive online tuning. Worse yet, the sysfs-based DAMON user interface doesn't support online tuning at all. DAMON_RECLAIM also doesn't support online tuning. This patchset makes the DAMON kernel API, DAMON sysfs interface, and DAMON_RECLAIM supports online tuning. Sequence of patches ------------------- First two patches enhance DAMON online tuning for kernel API users. Specifically, patch 1 let kernel API users to be able to do DAMON online tuning without a restriction, and patch 2 makes error handling easier. Following seven patches (patches 3-9) refactor code for better readability and easier reuse of code fragments that will be useful for online tuning support. Patch 10 introduces DAMON callback based user request handling structure for DAMON sysfs interface, and patch 11 enables DAMON online tuning via DAMON sysfs interface. Documentation patch (patch 12) for usage of it follows. Patch 13 enables online tuning of DAMON_RECLAIM and finally patch 14 documents the DAMON_RECLAIM online tuning usage. SeongJae Park (14): mm/damon/core: add a new callback for watermarks checks mm/damon/core: finish kdamond as soon as any callback returns an error mm/damon/vaddr: generalize damon_va_apply_three_regions() mm/damon/vaddr: move 'damon_set_regions()' to core mm/damon/vaddr: remove damon_va_apply_three_regions() mm/damon/sysfs: prohibit multiple physical address space monitoring targets mm/damon/sysfs: move targets setup code to a separated function mm/damon/sysfs: reuse damon_set_regions() for regions setting mm/damon/sysfs: use enum for 'state' input handling mm/damon/sysfs: update schemes stat in the kdamond context mm/damon/sysfs: support online inputs update Docs/{ABI,admin-guide}/damon: Update for 'state' sysfs file input keyword, 'commit' mm/damon/reclaim: support online inputs update Docs/admin-guide/mm/damon/reclaim: document 'commit_inputs' parameter .../ABI/testing/sysfs-kernel-mm-damon | 7 +- .../admin-guide/mm/damon/reclaim.rst | 11 + Documentation/admin-guide/mm/damon/usage.rst | 9 +- include/linux/damon.h | 9 + mm/damon/core.c | 89 +++- mm/damon/reclaim.c | 95 +++-- mm/damon/sysfs.c | 382 +++++++++++++++--- mm/damon/vaddr-test.h | 6 +- mm/damon/vaddr.c | 73 +--- 9 files changed, 500 insertions(+), 181 deletions(-)