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: 15125 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp2216593vqo; Mon, 9 Oct 2023 18:26:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEkiurmU9SwkFPlhWBnQ2UMnt5tjDpZNX7XcPZOqA2tE3XlbGFem1pSnghQoqwYKUQm4hRk X-Received: by 2002:a17:90b:3843:b0:279:1035:4443 with SMTP id nl3-20020a17090b384300b0027910354443mr14883300pjb.8.1696901205377; Mon, 09 Oct 2023 18:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696901205; cv=none; d=google.com; s=arc-20160816; b=BWvvCkNOS+A1pRxCvSlNgwfqDloiLY68NPgTJ5FO0V1vYcAGWA78jRxziW5ktvMoCk Fh9WqrcOnb5+Gqmq7u6wCBQaogz0GIfOGzqrgPipPvrNeaYUMJgEzClZ5x/cFzwzWQEQ SrXT8EJZoLDdWG4kpW54dJ8DWnFqs4GBXmw4S0Y3ATmdTbqOScFtBpX2NGWiQ+F4iGHJ MGopSGAAnME0NiZCIukeGzGrNgmwcrf5c50wTwwZXJCVqbZmgAA7bNEiNnNg6f4D8tRc 9UYPdgF0gpSuv/NU/k2MSoMa+DY968DX8oMxTOx9Aj2zDRjiv0lhIbpWzNrZXcD5AXhM n+xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=6kO/Ok4kStZ23tUyqxhRvRS2n1njJHtiJi2szU0h2BQ=; fh=cjv8+TZ63Co1l5yw6pZdw5NyP6++sWCb693WxBRE0rY=; b=WFeA1rc3bVC8MhY8EwRQdl5cv1jOpV5XIvEUR9t7ryUTsNIxg8fsvubkWO9w7ieYID DfdQBFsrLt22cn9YB7MSbxFF2q5e0cjLE1b6efppwt8/eC5RTtg1jt254eXZ8GnyDr0l jNwTDqkgiscrDXDQaKqIgmPTyORHj5URllGLkMNXs+YvXhUUQS6dg1JRX3Sijy+VOMAI lIg6bhBQCejBouDTWreXEuWbvkzbr/pGpaxZ0Dnw9sS2QqIfS26+4MceTROHbVck4Cmx luxuaf0KG2MtZE0iG+h24qcyxjIuCPiBGUyyXQM0GBFnBGpXxhs1dxBVHlnVid2NQM0f JhWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=acJQ2yhR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id e4-20020a17090ab38400b0027652885184si12429531pjr.91.2023.10.09.18.26.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 18:26:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=acJQ2yhR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 992958028E6B; Mon, 9 Oct 2023 18:26:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379278AbjJJB0J (ORCPT + 18 others); Mon, 9 Oct 2023 21:26:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379221AbjJJB0I (ORCPT ); Mon, 9 Oct 2023 21:26:08 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 773EA9E; Mon, 9 Oct 2023 18:26:06 -0700 (PDT) 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 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 09 Oct 2023 18:26:21 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779329878411369214 X-GMAIL-MSGID: 1779329878411369214 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