From patchwork Tue Oct 10 01:25:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13414730 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 BBD61CD68E3 for ; Tue, 10 Oct 2023 01:26:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 324B18D00A9; Mon, 9 Oct 2023 21:26:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2D4158D0089; Mon, 9 Oct 2023 21:26:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1C35D8D00A9; Mon, 9 Oct 2023 21:26:10 -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 0BF4A8D0089 for ; Mon, 9 Oct 2023 21:26:10 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id C3570804C3 for ; Tue, 10 Oct 2023 01:26:09 +0000 (UTC) X-FDA: 81327810858.01.B6685D3 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf03.hostedemail.com (Postfix) with ESMTP id 2AB612000C for ; Tue, 10 Oct 2023 01:26:07 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=acJQ2yhR; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf03.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696901168; 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=6kO/Ok4kStZ23tUyqxhRvRS2n1njJHtiJi2szU0h2BQ=; b=IQeLq5S7YYaTivDMvLyCumKOUyZdFD3FJJQJJa3qSIMyzCKi17AeHXBFhUfmMFaskqAdLw NgA34AGEiHpbmZPOTERN4+nqpvtMyz90HeDIqKPUA7jVmfFRKj8wHH+XbsnuGpnqDlKDii 82m8c6vsRMK44XYweNy32AOyZn9PMH4= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=acJQ2yhR; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf03.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696901168; a=rsa-sha256; cv=none; b=ZvL/KPfTZwbKomr1swerZ0b5xg01y4mcXcF26lU8UHYf5JMsFnCGUkQH4p+vermHEE3Zak IAXtJWkHdojudCKHcdzm7N9tbe+dhG39uhq/jyRj/JFRhWnHd2rPYBx10aeD+jOI18SOcV WapL+oF6ksZnD5mFFeRvXznyuJy47/Q= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id B79D7B816F6; Tue, 10 Oct 2023 01:26:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CE93C433C7; Tue, 10 Oct 2023 01:26:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696901166; bh=HVAHuF8iokPA8ik12/+0QhZWW8DSLeiwct1MhJbYb0A=; h=From:To:Cc:Subject:Date:From; b=acJQ2yhRavHVHsPbpUF41TmXkc1AgwkBbFJXA6wIle+Jdj60Nkx6xAHUQ0fGosjV9 kBcFM48iWNIxIoyp44s/fm7BnXrUhifKPLXdEhsxi8mOFVZTxGf+ciIcdTNrCgEyPj /5wdJVFbEf+uM90AXO/94wj6ZoQSNeSts9PMJOD5uetKJL28laITxL2u8Wtf1m+O29 88NbK+BBWFMH0SYEuQ7R5UY9AE2P9MtsyWefzOa6E7FYJ1MhcAkfJZV5SW8Q2aXsUy PMtKS7Zq2udmeSthTvqTVW6yuI/v+xK7i7KgFyvZkhTBk/C5CLKYQ8uT7yhbv+VE1h LmRNR9jBjnGUA== From: SeongJae Park To: Cc: SeongJae Park , Andrew Morton , Jonathan Corbet , damon@lists.linux.dev, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/3] mm/damon/sysfs-schemes: Do DAMOS tried regions update for one apply interval Date: Tue, 10 Oct 2023 01:25:57 +0000 Message-Id: <20231010012600.83140-1-sj@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 2AB612000C X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: kzw7smzqdo9jcwsyno78opt875ajjeb7 X-HE-Tag: 1696901167-606810 X-HE-Meta: U2FsdGVkX19sZTtoGwHSp5rDXV/383trJP77JZNNjEMVYFskf345OYeThp6WJPXiiF45Aj6vXoxJy2vovnE8J8uSKwXEyPN/E8f6tuwub91LaNAPe4ab44Kcmq3WE8uwxiyPZ0ZoO6ypAekpvRIKKBFqzY1Np9FPTzUoGiakRd5wsSf+NbUpKZkcUezyyv7EIghZxq8s6lZdrrd15k/geCIUt1L36ikIN3wUugOaGS+2EKDjvLdB9dQYY4NmQ2QMvEYSCcTZdCJhucmjKxzsN7SoUlUdTc57/V0COjKoJ855kFYjVmBh8tK9iZJGsundBAG0lXoeyIqVA8bFQCCfxUqCw0OjVIMyOMPG6/1P06/0qnUNzu5TP6ZtQqPnLxd1wjvF5BNMYP/EsrjwByT5YWgXrNk2h6igtjw/3MsysZgZPRquproN12WdailQwZN1R5C+Vbl+7gWIt0sK1NYuAF0mHE7w8i2ee9ftSItMsLhgBw5TvuweDqrsYpC1g+hVJxvKKo7aeHYxE92d2svgINHxopV7WT7fuPePKyU2oEFtAk17zvY7pYO7Yczy7yoElOKD4jhvnMIoM1q3sZOmUXTozYh+rPpo59EsEPsIJTpDupW2lptGWwvm7hmsP2NtAV1mdXcfBDVf+/zLFiO8KDafm2TOuaUVoP30pnccC0d+9aDJNNjexWOLlMKVXX5z+fTLvpe8/f624v+z4xxLa5QCiKo93L9LzgHrtzO8LBH8t020ug6OX3B/1nRCAZqoPd2WjgnPRoeV9d2ppdjEk6o2XsMFJb6ZzifZa5xr9SvU7CDbW7i0+fffkUUhuKdqA4ySDw85MuiK+sP24eQHIx8WYLQN6xxVYNZUEBipjMcMN2rnB9y74+nik3XhEBMJuIGQG6Cbn37yaWQGPCYYK60UieijPCuSNjifdNUPsJQhc6UB32AEp2TTlduiZy9PnkOMdRXupo5fAvEc4eo GcldKJXV Rkp/lDrhjdcsDcbPDMnNIbX3uWn8pUFGIrwjoRc77OQadzwCN0XhIQ89h8lODkJ53P893LBbpDonfd3rdgX1FPKLhllIyip+D9VoL2xg2sdNdPpC55N4u7vS5S790dWF8eVjBNpZ7/7lBmRtak+l4Pv4jpUxpj63rk2hDhPUjAkfTCEzitqKdkv5Img== X-Bogosity: Ham, tests=bogofilter, spamicity=0.001576, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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: 369359a808616f7f87172568da7933f65834caab