From patchwork Thu Oct 12 19:22:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13419675 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 8491CCDB46E for ; Thu, 12 Oct 2023 19:23:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BF7088D013B; Thu, 12 Oct 2023 15:23:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BA7218D0002; Thu, 12 Oct 2023 15:23:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A986A8D013B; Thu, 12 Oct 2023 15:23:01 -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 98D128D0002 for ; Thu, 12 Oct 2023 15:23:01 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 3BD63140854 for ; Thu, 12 Oct 2023 19:23:01 +0000 (UTC) X-FDA: 81337782162.19.2CD851C Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf12.hostedemail.com (Postfix) with ESMTP id 783C24000A for ; Thu, 12 Oct 2023 19:22:59 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=aqFUhq0p; spf=pass (imf12.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=1697138579; 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:references:dkim-signature; bh=58jeOcEBnFA7lKEuRbZIvKF3IsNCattCqVmfk0OEdhA=; b=xGyiR07cN/UmZ6Ke6dVNKw2V6GYwdw9yBPAX0iRBXHf8RvTJNPkr1VsbbULYUhSzP0/zZ+ OzfjFamg4xl6qv/8XZ9Do/unF7UDxv2Y9/6oZP0Xfx6YosKwOWvLPaS05x7+89oOELXxl4 KC7Fnw7zThHqEFdfj5TEjj9kKEf0tQs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697138579; a=rsa-sha256; cv=none; b=4jKKTuw1CvV0WNcyFhZnDme92D2nO7Xv9R4oGZHy/Qx31VQFqmzRX40DFsmd9a0TSK15PU p4d+mQ5XypRiIXna7mTg0f66vG2yI0h2NfV5K2i9hZqb55aewcre4fMYzuLo5yEfKXxetQ SWIpJJujWB+QgJyGf00Wz/w35QuOh58= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=aqFUhq0p; spf=pass (imf12.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 (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 71C5461F2F; Thu, 12 Oct 2023 19:22:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F4A7C433C7; Thu, 12 Oct 2023 19:22:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697138578; bh=dhkNkcd5s5dF4hY99APwOOIKtTfhuQ585ymiYD2asqE=; h=From:To:Cc:Subject:Date:From; b=aqFUhq0pY1YB2OjHpjc0rQz4kU1EVFhRX7IY2f1LSyOh0qJXFpzH4+Qlm5zltWdT3 I+gDoQUNF3S5+s75NqsZW5GugdC4+m35pte3sdBnx6tq2ga1Hac8J7pMbNHra+Efcg V7YNhtDQEX/n+/LnIulfUF57Em6W5I+ZW2RuV+QrdgfdlXwY1GTNkXMZGjBBlIRjlg h3F1IiXedOJgtVat2g57BmwtcEkPUKGFAVatVIwvM9+7/blH7Q6s+UuGI5EluTOM5Y bJNJPKhG8EPkl9eTtRgB9lQeabHG5umqCVM1jNwZJZkBIe861zNWWcpb6Hh5UyjfAO mEu5jxwitRKFg== 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 0/3] mm/damon/sysfs-schemes: Do DAMOS tried regions update for only one apply interval Date: Thu, 12 Oct 2023 19:22:52 +0000 Message-Id: <20231012192256.33556-1-sj@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 783C24000A X-Rspam-User: X-Stat-Signature: 1zz3uwkjuf1hn9w76cuxpcxx8zzhhofo X-Rspamd-Server: rspam03 X-HE-Tag: 1697138579-238722 X-HE-Meta: U2FsdGVkX1/4zN+1LwsMH3VqgWsERrhz+jp1p726MQ8QaJJm443VkEQy1QmKXQD7BDUk04XNiWN3/BMGV0Z7j7SvCpUTQJ6eJnu3JwPH8i5zZ/V4ptf533T0R6b33xZnNK9Qacx+uzdyFcRTJbkII9v6+tzAzmr+DlMBDNrrUkEPwCDzjpzanTQ7m+U4XpRtld39U3qHZUsCcZXEBWV1H8CikoThDCSTTvTBQ2E3KxWxDBGN1Th4t1qI8ZZMNcb5wZYQJiMA05Xujlpk7YOe9Mlg/cY/+xl0OtFUSXNimR/A07XjV6AdFkc/N+bTEQF+oXJ9j9FVeePzczc0e7i6W29GpJPVithyBEPVWxyYsX4v0YseBz4WIBxPwagXbzOLHf/MUymCQuNMcpXznV3jZLntZ0Ep9aGGt0BEn4pvDdG4pYXQOSK7SIB7ydiUIHOEA6Nbw7J5Vc+3AIgZIuqHIp2WrQAKG+SCAqzbbn16KEokC8NjdXQV0T00yCdPpUQ2gacC29QycDJySYeM3+1dpqvcTu0TjoCJ0Z7HQOxEvDbqO7jjFld8NsQpD43VTlNhErnuLppesFSLOFsZ1VKNMaEzjDTZSS5K8begqrKLC7XQ+vdPzKAkdmDm+ZZD8KmaCGPiwpGjsQ3gboOJ7wK8+83uCRflMb//b7xPjSI4V3r+4gVamZVeBuIx2O/mE+n3YB8xb3v6S8+eYI2o070XdNprS2+5w41KeUfyYC2Ax+ZHR808YWTocSjTkSqO+lj3uf6oKk5gYzgZ5zyiKTrQYZdsVjFehEhPGW5GoLVNBfW8zUE1BBFIQRznf0xj3vHRdNcQjKAbez731lUQ9fzRscAwYCs2s5PNtM/tsU6tB+3uzbIsvoAYt/c3LcZN+qgayfXdabwvU/GbElosa6rAmXgBGJG7QUqoAbHnGwDx4KD3yMgc7COnijJuPPjSQnp3XyfZUr3XZ2jMFXQpJD7 0fUeGDWR Xzgx7dVDQvFb6kP9Vom/0RtTCdKZWckPmslt8IWNc3j5xuito04dR5G2Q5B9qnMkeQLT3M4Ow3X9a9CcoVAk/KRTh9esT6jbVMIiSMbT2+0w+xoJ+eeG7j1p4eIsCGRnkOdvM6mFiZqcHN13fHL6eEku9g7gbCbJgrm0QBNrE1j6PkpHgXXWkKbQ+dSV0RlJxbEHf+h1QZAiLMiT/uoLrv0bivQUH46cmB99wh4cW03KIZbKNl4wYI8mWQg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000048, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Changes from RFC (https://lore.kernel.org/damon/20231010012600.83140-1-sj@kernel.org/) - Rebase on latest mm-unstable DAMOS tried regions update feature of DAMON sysfs interface is doing the update for one aggregation interval after the request is made. Since the per-scheme apply interval is supported, that behavior makes no much sense. That is, the tried regions directory will have regions from multiple DAMON monitoring results snapshots, or no region for apply intervals that much shorter than, or longer than the aggregation interval, respectively. Update the behavior to update the regions for each scheme for only its apply interval, and update the document. Since DAMOS apply interval is the aggregation by default, this change makes no visible behavioral difference to old users who don't explicitly set the apply intervals. Patches Sequence ---------------- The first two patches makes schemes of apply intervals that much shorter or longer than the aggregation interval to keep the maximum and minimum times for continuing the update. After the two patches, the update aligns with the each scheme's apply interval. Finally, the third patch updates the document to reflect the behavior. SeongJae Park (3): mm/damon/sysfs-schemes: do not update tried regions more than one DAMON snapshot mm/damon/sysfs: avoid empty scheme tried regions for large apply interval Docs/admin-guide/mm/damon/usage: update for tried regions update time interval Documentation/admin-guide/mm/damon/usage.rst | 6 +- mm/damon/sysfs-common.h | 2 + mm/damon/sysfs-schemes.c | 93 ++++++++++++++++++++ mm/damon/sysfs.c | 34 ++++++- 4 files changed, 128 insertions(+), 7 deletions(-) base-commit: 937421b2a4e95c57fddf10477b949fa5693711da