From nobody Thu Dec 18 09:41:00 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77697EE7FF4 for ; Sun, 10 Sep 2023 03:41:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343833AbjIJDk7 (ORCPT ); Sat, 9 Sep 2023 23:40:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236829AbjIJDk4 (ORCPT ); Sat, 9 Sep 2023 23:40:56 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D84119E for ; Sat, 9 Sep 2023 20:40:52 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC3E3C433CA; Sun, 10 Sep 2023 03:40:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694317252; bh=ksAtuRMHUySOp8Xx1g77nkmGZFnU3FZ4zcI4qBiSy/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ecUnwAiCcOAgRM4f0xtr+cxgCRncgILzBDXmIG/5Vd1IiS25/+TOD765eUx12lkbK Hbh7qPvTSqx2y7tFuVbwgEJJCdrc4VOBaLbrFw1nKuFRp5xtLAOIyRSU35QDEpORhV 3zPFTr9qA8WrXg8bJ7ICCMpcA9/JDVX3A0iT3GMV9/qt7mcI6uo7vtdA6ApLS6cEns EVTQ6ni8/Ebvnri1GA6uUZ8wjkDZ4JjyZUxxPrChUk4a1ErFyV6YEwtYFxUc7Zphaz ZYcCz9+BnwmnfYGH7q91HlkK6vyvfNLOtDfMRyUz5QZC2xuOT3G2BZeP9sKfr5W0Jz eTLniDweakmyw== From: SeongJae Park Cc: SeongJae Park , Andrew Morton , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC 1/8] mm/damon/core: make DAMOS uses nr_accesses_bp instead of nr_accesses Date: Sun, 10 Sep 2023 03:40:41 +0000 Message-Id: <20230910034048.59191-2-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230910034048.59191-1-sj@kernel.org> References: <20230910034048.59191-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" DAMON provides nr_accesses_bp, which becomes same to nr_accesses * 10000 for every aggregation interval, but updated every sampling interval with a reasonable accuracy. Since DAMON-based operation schemes are applied in every aggregation interval using nr_accesses, using nr_accesses_bp instead will make no difference. This also makes future DAMOS changes for applying the scheme in a time interval that less than the aggregation interval possible. Signed-off-by: SeongJae Park --- mm/damon/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/damon/core.c b/mm/damon/core.c index 83b0cd329e84..3e0532c6896c 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -799,12 +799,13 @@ static void damon_split_region_at(struct damon_target= *t, static bool __damos_valid_target(struct damon_region *r, struct damos *s) { unsigned long sz; + unsigned int nr_accesses =3D r->nr_accesses_bp / 10000; =20 sz =3D damon_sz_region(r); return s->pattern.min_sz_region <=3D sz && sz <=3D s->pattern.max_sz_region && - s->pattern.min_nr_accesses <=3D r->nr_accesses && - r->nr_accesses <=3D s->pattern.max_nr_accesses && + s->pattern.min_nr_accesses <=3D nr_accesses && + nr_accesses <=3D s->pattern.max_nr_accesses && s->pattern.min_age_region <=3D r->age && r->age <=3D s->pattern.max_age_region; } --=20 2.25.1 From nobody Thu Dec 18 09:41:00 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6965CEEB57E for ; Sun, 10 Sep 2023 03:41:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345245AbjIJDlD (ORCPT ); Sat, 9 Sep 2023 23:41:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237566AbjIJDk5 (ORCPT ); Sat, 9 Sep 2023 23:40:57 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 552391BF for ; Sat, 9 Sep 2023 20:40:53 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 606FBC433C9; Sun, 10 Sep 2023 03:40:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694317252; bh=P7zQCwnjvNM/0KUc4+YEr5PqkR+all9uO1LM0PE/RX4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LrXyTnttdpLzVeZIEYQ1KlPf1eGSXzz5UV1gKdhzO3/x5aa0WKFyKpbq5vjX+2YPa k1Gdsop+MdQM08S0rG5L+8BsW1Pl12AMmtn0AU7TlzZBlbItisrpjdTgcYeBdIE7H2 8UpeGBcJO685O3hytod/LaJ+8cyLzSi7hJiW0WJsCjt5e9C3PV77c/bVTk8jtsn/zP 8AMzsjEInb8mB/y5NWGGMGe6Bf0+IRcXNYw873mvEdT4tZ40aBQ6Yc4MWa4npct0Oc TgvrV+xEAsxQJR7081G3Y3uW2HmYFPbRPRSitFZnTa/nS8H+fVV2natp1V34kA95J2 5TBv/I1QLkwJQ== From: SeongJae Park Cc: SeongJae Park , Andrew Morton , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC 2/8] mm/damon/sysfs-schemes: expose nr_accesses_bp via tried_regions//nr_accesses Date: Sun, 10 Sep 2023 03:40:42 +0000 Message-Id: <20230910034048.59191-3-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230910034048.59191-1-sj@kernel.org> References: <20230910034048.59191-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" DAMON sysfs interface exposes access rate of each region via DAMOS tried regions directory. For this, the nr_accesses field of the region is being used. DAMOS was using nr_accesses in the past, but it uses nr_accesses_bp now. Expose the value that it is really using. Note that it doesn't expose nr_accesses_bp as is (in basis point), but after converting it to the natural number by dividing the value by 10,000. That's for not making unnecessary confusion to the old users. Signed-off-by: SeongJae Park --- mm/damon/sysfs-schemes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c index 527e7d17eb3b..093700f50b18 100644 --- a/mm/damon/sysfs-schemes.c +++ b/mm/damon/sysfs-schemes.c @@ -31,7 +31,7 @@ static struct damon_sysfs_scheme_region *damon_sysfs_sche= me_region_alloc( return NULL; sysfs_region->kobj =3D (struct kobject){}; sysfs_region->ar =3D region->ar; - sysfs_region->nr_accesses =3D region->nr_accesses; + sysfs_region->nr_accesses =3D region->nr_accesses_bp / 10000; sysfs_region->age =3D region->age; INIT_LIST_HEAD(&sysfs_region->list); return sysfs_region; --=20 2.25.1 From nobody Thu Dec 18 09:41:00 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 714D3EEB580 for ; Sun, 10 Sep 2023 03:41:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345849AbjIJDlG (ORCPT ); Sat, 9 Sep 2023 23:41:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241204AbjIJDk5 (ORCPT ); Sat, 9 Sep 2023 23:40:57 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD64318F; Sat, 9 Sep 2023 20:40:53 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E782EC433CD; Sun, 10 Sep 2023 03:40:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694317253; bh=MX3U5PAIeegCJCB7eLilaWjnagt4bwpadGy8uCoTAPk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ukwU7ClsMJzswDPgiPqi34noD/YWgkgpYy9DTKZv6j27OpTnHzCYojjnIIeATvJYN ahttWt3gMemTLniiTvBNfWs/xtDY8/cnBxOVexAWmn/45Om5A9B80Fyd8Lh4ayso3S h2IOtpquQVNeVk/ljEco9I+zHWzG9plGhihdWjIUaDeakrlOgGuNxa+XnnDi/A8gfO N70z6/+H4ITZFIZp3II+NPOj7wCMGK/ofQn13w16+xfVvSR5dGtKacsaVZgLXNbC3d I4z7iTc426dEh1+QdaG28ZXBNBtTVotkJ75bMNBlcObJljwa3L3QDiAfMbfxEPN47s bXb9XM7/1Dh8w== From: SeongJae Park Cc: SeongJae Park , Andrew Morton , Steven Rostedt , damon@lists.linux.dev, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC 3/8] mm/damon/core: expose nr_accesses_bp from damos_before_apply tracepoint Date: Sun, 10 Sep 2023 03:40:43 +0000 Message-Id: <20230910034048.59191-4-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230910034048.59191-1-sj@kernel.org> References: <20230910034048.59191-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" damos_before_apply tracepoint is exposing access rate of DAMON regions using nr_accesses, which was actually used by DAMOS in the past. However, it has changed to use nr_accesses_bp instead. Update the tracepoint to expose the value that DAMOS is really using. Note that it doesn't expose the value as is in the basis point, but after converting it to the natural number by dividing it by 10,000. That's for avoiding confuses for old users. Signed-off-by: SeongJae Park --- include/trace/events/damon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/trace/events/damon.h b/include/trace/events/damon.h index 9e7b39495b05..6f98198c0104 100644 --- a/include/trace/events/damon.h +++ b/include/trace/events/damon.h @@ -34,7 +34,7 @@ TRACE_EVENT(damos_before_apply, __entry->target_idx =3D target_idx; __entry->start =3D r->ar.start; __entry->end =3D r->ar.end; - __entry->nr_accesses =3D r->nr_accesses; + __entry->nr_accesses =3D r->nr_accesses_bp / 10000; __entry->age =3D r->age; __entry->nr_regions =3D nr_regions; ), --=20 2.25.1 From nobody Thu Dec 18 09:41:00 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D067BEE7FF4 for ; Sun, 10 Sep 2023 03:41:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345864AbjIJDlO (ORCPT ); Sat, 9 Sep 2023 23:41:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242824AbjIJDk7 (ORCPT ); Sat, 9 Sep 2023 23:40:59 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FE9C18F for ; Sat, 9 Sep 2023 20:40:54 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99B7FC433C7; Sun, 10 Sep 2023 03:40:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694317254; bh=DjnOjctR1HpX3KfBkTd9mJQPbWLMb6UvjaZw+MXDlfw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WeRTQo6DJOWDrNGyr55EHwB4hhqOco7edVSXVAZ74USTrG9CgzrwxoemPH6RxKpMt 1kuH8dC07oeYZsnHrKA7doiMYxJC9ghg69UKlemEh9VJqYeHxMwcb/zbnjsRknJrzK +zYwDjGmlCnOjyaY0j51NVV3dcmm5FTr5inHpIrhy0k1qHldsrFcShAurnipSa6TSU /MfGJqPDB2Mc0JsQStkiqJvTbY+AIsT9s9gmI2Aa/8TDZeVgiu0a/DJVcIGCkxO8oV K9TpVDT+SV54AM4/t7G1wkBROaQ29R7Dx5LvHox5XaOHhBMcbTwMnPt+zHcLXQ8U8K ZUIsF2p/i0oZQ== From: SeongJae Park Cc: SeongJae Park , Andrew Morton , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC 4/8] mm/damon/core: implement scheme-specific apply interval Date: Sun, 10 Sep 2023 03:40:44 +0000 Message-Id: <20230910034048.59191-5-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230910034048.59191-1-sj@kernel.org> References: <20230910034048.59191-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" DAMON-based operation schemes are applied for every aggregation interval. That was mainly because schemes were using nr_accesses, which be complete to be used for every aggregation interval. However, the schemes are now using nr_accesses_bp, which is updated for each sampling interval in a way that reasonable to be used. Therefore, there is no reason to apply schemes for each aggregation interval. The unnecessary alignment with aggregation interval was also making some use case of DAMOS tricky. Quota setting under long aggregation interval is one such example. Suppose the aggregation interval is ten seconds, and there is a scheme having CPU quota 100ms per 1s. The scheme will actually uses 100ms per ten seconds, since it cannobe be applied before next aggregation interval. The feature is working as intended, but the results might not that intuitive for some users. This could be fixed by updating the quota to 1s per 10s. But, in the case, the CPU usage of DAMOS could look like spikes, and actually make a bad effect to other CPU-sensitive workloads. Implement a dedicated timing interval for each DAMON-based operation scheme, namely apply_interval. The interval will be sampling interval aligned, and each scheme will be applied for its apply_interval. The interval is set to 0 by default, and it means the scheme should use the aggregation interval instead. This avoids old users getting any behavioral difference. Signed-off-by: SeongJae Park --- include/linux/damon.h | 17 +++++++-- mm/damon/core.c | 75 ++++++++++++++++++++++++++++++++++++---- mm/damon/dbgfs.c | 3 +- mm/damon/lru_sort.c | 2 ++ mm/damon/reclaim.c | 2 ++ mm/damon/sysfs-schemes.c | 2 +- 6 files changed, 91 insertions(+), 10 deletions(-) diff --git a/include/linux/damon.h b/include/linux/damon.h index 491fdd3e4c76..27b995c22497 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -314,16 +314,19 @@ struct damos_access_pattern { * struct damos - Represents a Data Access Monitoring-based Operation Sche= me. * @pattern: Access pattern of target regions. * @action: &damo_action to be applied to the target regions. + * @apply_interval_us: The time between applying the @action. * @quota: Control the aggressiveness of this scheme. * @wmarks: Watermarks for automated (in)activation of this scheme. * @filters: Additional set of &struct damos_filter for &action. * @stat: Statistics of this scheme. * @list: List head for siblings. * - * For each aggregation interval, DAMON finds regions which fit in the + * For each @apply_interval_us, DAMON finds regions which fit in the * &pattern and applies &action to those. To avoid consuming too much * CPU time or IO resources for the &action, "a is used. * + * If @apply_interval_us is zero, &damon_attrs->aggr_interval is used inst= ead. + * * To do the work only when needed, schemes can be activated for specific * system situations using &wmarks. If all schemes that registered to the * monitoring context are inactive, DAMON stops monitoring either, and just @@ -340,6 +343,14 @@ struct damos_access_pattern { struct damos { struct damos_access_pattern pattern; enum damos_action action; + unsigned long apply_interval_us; +/* private: internal use only */ + /* + * number of sample intervals that should be passed before applying + * @action + */ + unsigned long next_apply_sis; +/* public: */ struct damos_quota quota; struct damos_watermarks wmarks; struct list_head filters; @@ -641,7 +652,9 @@ void damos_add_filter(struct damos *s, struct damos_fil= ter *f); void damos_destroy_filter(struct damos_filter *f); =20 struct damos *damon_new_scheme(struct damos_access_pattern *pattern, - enum damos_action action, struct damos_quota *quota, + enum damos_action action, + unsigned long apply_interval_us, + struct damos_quota *quota, struct damos_watermarks *wmarks); void damon_add_scheme(struct damon_ctx *ctx, struct damos *s); void damon_destroy_scheme(struct damos *s); diff --git a/mm/damon/core.c b/mm/damon/core.c index 3e0532c6896c..c2801656a32d 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -323,7 +323,9 @@ static struct damos_quota *damos_quota_init_priv(struct= damos_quota *quota) } =20 struct damos *damon_new_scheme(struct damos_access_pattern *pattern, - enum damos_action action, struct damos_quota *quota, + enum damos_action action, + unsigned long apply_interval_us, + struct damos_quota *quota, struct damos_watermarks *wmarks) { struct damos *scheme; @@ -333,6 +335,13 @@ struct damos *damon_new_scheme(struct damos_access_pat= tern *pattern, return NULL; scheme->pattern =3D *pattern; scheme->action =3D action; + scheme->apply_interval_us =3D apply_interval_us; + /* + * next_apply_sis will be set when kdamond starts. While kdamond is + * running, it will also updated when it is added to the DAMON context, + * or damon_attrs are updated. + */ + scheme->next_apply_sis =3D 0; INIT_LIST_HEAD(&scheme->filters); scheme->stat =3D (struct damos_stat){}; INIT_LIST_HEAD(&scheme->list); @@ -345,9 +354,21 @@ struct damos *damon_new_scheme(struct damos_access_pat= tern *pattern, return scheme; } =20 +static void damos_set_next_apply_sis(struct damos *s, struct damon_ctx *ct= x) +{ + unsigned long sample_interval =3D ctx->attrs.sample_interval ? + ctx->attrs.sample_interval : 1; + unsigned long apply_interval =3D s->apply_interval_us ? + s->apply_interval_us : ctx->attrs.aggr_interval; + + s->next_apply_sis =3D ctx->passed_sample_intervals + + apply_interval / sample_interval; +} + void damon_add_scheme(struct damon_ctx *ctx, struct damos *s) { list_add_tail(&s->list, &ctx->schemes); + damos_set_next_apply_sis(s, ctx); } =20 static void damon_del_scheme(struct damos *s) @@ -586,6 +607,7 @@ static void damon_update_monitoring_results(struct damo= n_ctx *ctx, int damon_set_attrs(struct damon_ctx *ctx, struct damon_attrs *attrs) { unsigned long sample_interval; + struct damos *s; =20 if (attrs->min_nr_regions < 3) return -EINVAL; @@ -602,6 +624,10 @@ int damon_set_attrs(struct damon_ctx *ctx, struct damo= n_attrs *attrs) =20 damon_update_monitoring_results(ctx, attrs); ctx->attrs =3D *attrs; + + damon_for_each_scheme(s, ctx) + damos_set_next_apply_sis(s, ctx); + return 0; } =20 @@ -1127,14 +1153,29 @@ static void kdamond_apply_schemes(struct damon_ctx = *c) struct damon_target *t; struct damon_region *r, *next_r; struct damos *s; + unsigned long sample_interval =3D c->attrs.sample_interval ? + c->attrs.sample_interval : 1; + bool has_schemes_to_apply =3D false; =20 damon_for_each_scheme(s, c) { + if (c->passed_sample_intervals !=3D s->next_apply_sis) + continue; + + s->next_apply_sis +=3D + (s->apply_interval_us ? s->apply_interval_us : + c->attrs.aggr_interval) / sample_interval; + if (!s->wmarks.activated) continue; =20 + has_schemes_to_apply =3D true; + damos_adjust_quota(c, s); } =20 + if (!has_schemes_to_apply) + return; + damon_for_each_target(t, c) { damon_for_each_region_safe(r, next_r, t) damon_do_apply_schemes(c, t, r); @@ -1419,11 +1460,19 @@ static void kdamond_init_intervals_sis(struct damon= _ctx *ctx) { unsigned long sample_interval =3D ctx->attrs.sample_interval ? ctx->attrs.sample_interval : 1; + unsigned long apply_interval; + struct damos *scheme; =20 ctx->passed_sample_intervals =3D 0; ctx->next_aggregation_sis =3D ctx->attrs.aggr_interval / sample_interval; ctx->next_ops_update_sis =3D ctx->attrs.ops_update_interval / sample_interval; + + damon_for_each_scheme(scheme, ctx) { + apply_interval =3D scheme->apply_interval_us ? + scheme->apply_interval_us : ctx->attrs.aggr_interval; + scheme->next_apply_sis =3D apply_interval / sample_interval; + } } =20 /* @@ -1470,16 +1519,30 @@ static int kdamond_fn(void *data) ctx->attrs.sample_interval : 1; if (ctx->passed_sample_intervals =3D=3D ctx->next_aggregation_sis) { - ctx->next_aggregation_sis +=3D - ctx->attrs.aggr_interval / sample_interval; kdamond_merge_regions(ctx, max_nr_accesses / 10, sz_limit); if (ctx->callback.after_aggregation && - ctx->callback.after_aggregation(ctx)) + ctx->callback.after_aggregation(ctx)) { + ctx->next_aggregation_sis +=3D + ctx->attrs.aggr_interval / + sample_interval; break; - if (!list_empty(&ctx->schemes)) - kdamond_apply_schemes(ctx); + } + } + + /* + * do kdamond_apply_schemes() after kdamond_merge_regions() if + * possible, to reduce overhead + */ + if (!list_empty(&ctx->schemes)) + kdamond_apply_schemes(ctx); + + if (ctx->passed_sample_intervals =3D=3D + ctx->next_aggregation_sis) { + ctx->next_aggregation_sis +=3D + ctx->attrs.aggr_interval / sample_interval; + kdamond_reset_aggregated(ctx); kdamond_split_regions(ctx); if (ctx->ops.reset_aggregated) diff --git a/mm/damon/dbgfs.c b/mm/damon/dbgfs.c index 124f0f8c97b7..dc0ea1fc30ca 100644 --- a/mm/damon/dbgfs.c +++ b/mm/damon/dbgfs.c @@ -278,7 +278,8 @@ static struct damos **str_to_schemes(const char *str, s= size_t len, goto fail; =20 pos +=3D parsed; - scheme =3D damon_new_scheme(&pattern, action, "a, &wmarks); + scheme =3D damon_new_scheme(&pattern, action, 0, "a, + &wmarks); if (!scheme) goto fail; =20 diff --git a/mm/damon/lru_sort.c b/mm/damon/lru_sort.c index 7b8fce2f67a8..3ecdcc029443 100644 --- a/mm/damon/lru_sort.c +++ b/mm/damon/lru_sort.c @@ -158,6 +158,8 @@ static struct damos *damon_lru_sort_new_scheme( pattern, /* (de)prioritize on LRU-lists */ action, + /* for each aggregation interval */ + 0, /* under the quota. */ "a, /* (De)activate this according to the watermarks. */ diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c index 648d2a85523a..ab974e477d2f 100644 --- a/mm/damon/reclaim.c +++ b/mm/damon/reclaim.c @@ -142,6 +142,8 @@ static struct damos *damon_reclaim_new_scheme(void) &pattern, /* page out those, as soon as found */ DAMOS_PAGEOUT, + /* for each aggregation interval */ + 0, /* under the quota. */ &damon_reclaim_quota, /* (De)activate this according to the watermarks. */ diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c index 093700f50b18..3d30e85596b0 100644 --- a/mm/damon/sysfs-schemes.c +++ b/mm/damon/sysfs-schemes.c @@ -1610,7 +1610,7 @@ static struct damos *damon_sysfs_mk_scheme( .low =3D sysfs_wmarks->low, }; =20 - scheme =3D damon_new_scheme(&pattern, sysfs_scheme->action, "a, + scheme =3D damon_new_scheme(&pattern, sysfs_scheme->action, 0, "a, &wmarks); if (!scheme) return NULL; --=20 2.25.1 From nobody Thu Dec 18 09:41:00 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71E9CEE7FF4 for ; Sun, 10 Sep 2023 03:41:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232130AbjIJDlK (ORCPT ); Sat, 9 Sep 2023 23:41:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229672AbjIJDk6 (ORCPT ); Sat, 9 Sep 2023 23:40:58 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4E9619E; Sat, 9 Sep 2023 20:40:54 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D67FC433C8; Sun, 10 Sep 2023 03:40:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694317254; bh=nsy3XKNul10yj7Y4C7UdRuVcXMAYGZfrN5/ruA9B7bY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yhf4w8t1fRuZJ4OQ8rFWDO3TDcY+USKFEptrVl74C2KL5spB2Zm7tlR/98C/0sNNX rhds8nFJ0m+cI7S0M+YwFjbizIG1KlgBowZHNZwfOnTvg1oa99D1XAl9yxeJxHhcey l9O9mnGh9UuVDRJHIy/L80hW5C6JnQg8UT/6pyDzRJOvu1tCEwuR8TCMjmHOw/6z2J dY7f3eZ15EVtJUXM2gAt8rSYxhJUALgBNhJtxzEC4Pu0Axg7XISKpMseJNSlxYTM0N HRTMABvBxWGayiSMvVwnCtijn7zba+kdp3uMX4qtFCl6mmh4DCe+tofNnubO2Twi8L lAXzGYDSUTY+g== 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 5/8] Docs/mm/damon/design: document DAMOS apply intervals Date: Sun, 10 Sep 2023 03:40:45 +0000 Message-Id: <20230910034048.59191-6-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230910034048.59191-1-sj@kernel.org> References: <20230910034048.59191-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Update DAMON design doc to explain about DAMOS apply intervals. Signed-off-by: SeongJae Park --- Documentation/mm/damon/design.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/des= ign.rst index 18e9b42673f8..1f7e0586b5fa 100644 --- a/Documentation/mm/damon/design.rst +++ b/Documentation/mm/damon/design.rst @@ -259,7 +259,8 @@ works, DAMON provides a feature called Data Access Moni= toring-based Operation Schemes (DAMOS). It lets users specify their desired schemes at a high level. For such specifications, DAMON starts monitoring, finds regions ha= ving the access pattern of interest, and applies the user-desired operation act= ions -to the regions as soon as found. +to the regions, for every user-specified time interval called +``apply_interval``. =20 =20 .. _damon_design_damos_action: --=20 2.25.1 From nobody Thu Dec 18 09:41:00 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81013EE7FF4 for ; Sun, 10 Sep 2023 03:41:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345845AbjIJDlR (ORCPT ); Sat, 9 Sep 2023 23:41:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243635AbjIJDk7 (ORCPT ); Sat, 9 Sep 2023 23:40:59 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DB0D1BF for ; Sat, 9 Sep 2023 20:40:55 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2A62C43391; Sun, 10 Sep 2023 03:40:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694317255; bh=rUjHOoTpqiE+vomfhnfVsNQY6HBVoYZiR13zlPEqKrs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HksUUdUWanh2pIH/SIVi+KtR2Gpkua5pt58Q7EXmTfMRYCH7jaiFAOMfZNHBo42HY z39BHHSJOmBs/f8JKvNW0aPkpOiiMzWKRTfmOTIOLjJb8waymf//tQg5CphaSotpMd /Xz+oETjlqnLKNewbNPDT051K1hoSuHpjd7nOuFQamxyK84TH74GVw/5DSGP9iY+m0 oOf6ozysUwk04FHCgSAISPQ9GSarjemZhdkoPEv+0HpJ/OaGytO4+d/QwY/uTPG4Sy 9upFfCh6680+hjMyr10vq8w2P/tDJE1hwRqJrup3A7YoMVWoKHyfwmafq06KaUvh41 Qb9r1Q6zeXE2g== From: SeongJae Park Cc: SeongJae Park , Andrew Morton , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC 6/8] mm/damon/sysfs-schemes: support DAMOS apply interval Date: Sun, 10 Sep 2023 03:40:46 +0000 Message-Id: <20230910034048.59191-7-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230910034048.59191-1-sj@kernel.org> References: <20230910034048.59191-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Update DAMON sysfs interval to support DAMOS apply intervals. Users can set and get the interval for each scheme in microseconds by writing to and reading from the new sysfs file, 'apply_interval_us', in each scheme sysfs directory. Signed-off-by: SeongJae Park --- mm/damon/sysfs-schemes.c | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c index 3d30e85596b0..a7d70b95c4dd 100644 --- a/mm/damon/sysfs-schemes.c +++ b/mm/damon/sysfs-schemes.c @@ -1121,6 +1121,7 @@ struct damon_sysfs_scheme { struct kobject kobj; enum damos_action action; struct damon_sysfs_access_pattern *access_pattern; + unsigned long apply_interval_us; struct damon_sysfs_quotas *quotas; struct damon_sysfs_watermarks *watermarks; struct damon_sysfs_scheme_filters *filters; @@ -1141,7 +1142,7 @@ static const char * const damon_sysfs_damos_action_st= rs[] =3D { }; =20 static struct damon_sysfs_scheme *damon_sysfs_scheme_alloc( - enum damos_action action) + enum damos_action action, unsigned long apply_interval_us) { struct damon_sysfs_scheme *scheme =3D kmalloc(sizeof(*scheme), GFP_KERNEL); @@ -1150,6 +1151,7 @@ static struct damon_sysfs_scheme *damon_sysfs_scheme_= alloc( return NULL; scheme->kobj =3D (struct kobject){}; scheme->action =3D action; + scheme->apply_interval_us =3D apply_interval_us; return scheme; } =20 @@ -1353,6 +1355,25 @@ static ssize_t action_store(struct kobject *kobj, st= ruct kobj_attribute *attr, return -EINVAL; } =20 +static ssize_t apply_interval_us_show(struct kobject *kobj, + struct kobj_attribute *attr, char *buf) +{ + struct damon_sysfs_scheme *scheme =3D container_of(kobj, + struct damon_sysfs_scheme, kobj); + + return sysfs_emit(buf, "%lu\n", scheme->apply_interval_us); +} + +static ssize_t apply_interval_us_store(struct kobject *kobj, + struct kobj_attribute *attr, const char *buf, size_t count) +{ + struct damon_sysfs_scheme *scheme =3D container_of(kobj, + struct damon_sysfs_scheme, kobj); + int err =3D kstrtoul(buf, 0, &scheme->apply_interval_us); + + return err ? err : count; +} + static void damon_sysfs_scheme_release(struct kobject *kobj) { kfree(container_of(kobj, struct damon_sysfs_scheme, kobj)); @@ -1361,8 +1382,12 @@ static void damon_sysfs_scheme_release(struct kobjec= t *kobj) static struct kobj_attribute damon_sysfs_scheme_action_attr =3D __ATTR_RW_MODE(action, 0600); =20 +static struct kobj_attribute damon_sysfs_scheme_apply_interval_us_attr =3D + __ATTR_RW_MODE(apply_interval_us, 0600); + static struct attribute *damon_sysfs_scheme_attrs[] =3D { &damon_sysfs_scheme_action_attr.attr, + &damon_sysfs_scheme_apply_interval_us_attr.attr, NULL, }; ATTRIBUTE_GROUPS(damon_sysfs_scheme); @@ -1413,7 +1438,11 @@ static int damon_sysfs_schemes_add_dirs(struct damon= _sysfs_schemes *schemes, schemes->schemes_arr =3D schemes_arr; =20 for (i =3D 0; i < nr_schemes; i++) { - scheme =3D damon_sysfs_scheme_alloc(DAMOS_STAT); + /* + * apply_interval_us as 0 means same to aggregation interval + * (same to before-apply_interval behavior) + */ + scheme =3D damon_sysfs_scheme_alloc(DAMOS_STAT, 0); if (!scheme) { damon_sysfs_schemes_rm_dirs(schemes); return -ENOMEM; @@ -1610,8 +1639,8 @@ static struct damos *damon_sysfs_mk_scheme( .low =3D sysfs_wmarks->low, }; =20 - scheme =3D damon_new_scheme(&pattern, sysfs_scheme->action, 0, "a, - &wmarks); + scheme =3D damon_new_scheme(&pattern, sysfs_scheme->action, + sysfs_scheme->apply_interval_us, "a, &wmarks); if (!scheme) return NULL; =20 @@ -1641,6 +1670,7 @@ static void damon_sysfs_update_scheme(struct damos *s= cheme, scheme->pattern.max_age_region =3D access_pattern->age->max; =20 scheme->action =3D sysfs_scheme->action; + scheme->apply_interval_us =3D sysfs_scheme->apply_interval_us; =20 scheme->quota.ms =3D sysfs_quotas->ms; scheme->quota.sz =3D sysfs_quotas->sz; --=20 2.25.1 From nobody Thu Dec 18 09:41:00 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D96CBEEB57B for ; Sun, 10 Sep 2023 03:41:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346232AbjIJDlX (ORCPT ); Sat, 9 Sep 2023 23:41:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343962AbjIJDk7 (ORCPT ); Sat, 9 Sep 2023 23:40:59 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FE4018F; Sat, 9 Sep 2023 20:40:56 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BCC7C433CB; Sun, 10 Sep 2023 03:40:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694317256; bh=mFM51HzoacyqEH6SUQlgy6Seux4I2scRhn39ZTi26N8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ggjMC2rmC/l0w3mnxmHmvMLHBY+eoIkIhaqUHgcKJkeLp9KdJd9TOBud13T113lyx bK+9WVt2wR8tYBlSMiwDTbbJWBtR8c2uKMve4DoO47Ocw9i1LprtBLoEe8R1sVkRu6 QaVmD7Domx1Dhzr1xW9KHlMlM8CpgIkYhycXUCR1+xnrQy7lcckR7acPYU9lpf9ZKi 139vmPrd7zxFCh1zlOZ/eQoDhJMv/Ybu9j8+QqTtqcG/fUvso0W2tLBty1MDSUlTwy yyTYrg/FNIF/NEfT3QCrRkNG+qDMx2BtxTu2DvezLkq674bfGaS9kb86X/wN6Q68v5 MehGv6Co7gdAA== 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 7/8] Docs/admin-guide/mm/damon/usage: update for DAMOS apply intervals Date: Sun, 10 Sep 2023 03:40:47 +0000 Message-Id: <20230910034048.59191-8-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230910034048.59191-1-sj@kernel.org> References: <20230910034048.59191-1-sj@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update DAMON usage document's DAMON sysfs interface section for the newly added DAMOS apply intervals support (apply_interval_us file). Signed-off-by: SeongJae Park --- Documentation/admin-guide/mm/damon/usage.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/a= dmin-guide/mm/damon/usage.rst index 6272cd36590a..8507a6e45d86 100644 --- a/Documentation/admin-guide/mm/damon/usage.rst +++ b/Documentation/admin-guide/mm/damon/usage.rst @@ -76,7 +76,7 @@ comma (","). :: =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 ... =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 ... =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 schemes/nr_schemes - =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 0/action + =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 0/action,a= pply_interval_us =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = access_pattern/ =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 sz/min,max =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 nr_accesses/min,max @@ -269,8 +269,8 @@ schemes// ------------ =20 In each scheme directory, five directories (``access_pattern``, ``quotas``, -``watermarks``, ``filters``, ``stats``, and ``tried_regions``) and one file -(``action``) exist. +``watermarks``, ``filters``, ``stats``, and ``tried_regions``) and two fil= es +(``action`` and ``apply_interval``) exist. =20 The ``action`` file is for setting and getting the scheme's :ref:`action `. The keywords that can be written to and read @@ -296,6 +296,9 @@ Note that support of each action depends on the running= DAMON operations set - ``stat``: Do nothing but count the statistics. Supported by all operations sets. =20 +The ``apply_interval_us`` file is for setting and getting the scheme's +:ref:`apply_interval ` in microseconds. + schemes//access_pattern/ --------------------------- =20 --=20 2.25.1 From nobody Thu Dec 18 09:41:00 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 603F3EE7FF4 for ; Sun, 10 Sep 2023 03:41:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344900AbjIJDl0 (ORCPT ); Sat, 9 Sep 2023 23:41:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344260AbjIJDlA (ORCPT ); Sat, 9 Sep 2023 23:41:00 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEAC119E for ; Sat, 9 Sep 2023 20:40:56 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FF92C43395; Sun, 10 Sep 2023 03:40:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694317256; bh=eynGbeHbTWCoAAQx22o6QCyTrP+ceLiyJPZLaUvkSBw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S8Q9uAD8o9PcqFqVFXtN8GWHciJp1oKA9CHvzkSpgw2OPWsaRycMdldPI1RynQ5wX n3N+eRILhlbnDGLvA8HdsQknJrO7Yo5eOR6l2ePhuVATnpcYyhgx59gEiewNFrOVaB G7Xy+AuwGCx0+pXOdCLAuicPvGAqLNGAR1zzACOgQ+DBqMaRkLOWe+t7Xme9gU04WO 91IxlBNu0x8dHZrcbT6+TuwF2Jh7/H819njkFGH23Xml9mRdyUU0Wn7ffzt7rkujyp omII1CcYj4RI/3WxnO4vlWDtMvA/Ub6lqgD1orJJPnkmG4/OlkdKgQmZPNzXEtI8zf m+eV7d+nCJ4VQ== From: SeongJae Park Cc: SeongJae Park , Andrew Morton , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC 8/8] Docs/ABI/damon: update for DAMOS apply intervals Date: Sun, 10 Sep 2023 03:40:48 +0000 Message-Id: <20230910034048.59191-9-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230910034048.59191-1-sj@kernel.org> References: <20230910034048.59191-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Update DAMON ABI document for the newly added DAMON sysfs file for DAMOS apply intervals (apply_interval_us file). Signed-off-by: SeongJae Park --- Documentation/ABI/testing/sysfs-kernel-mm-damon | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-damon b/Documentatio= n/ABI/testing/sysfs-kernel-mm-damon index 420b30f09cf0..b35649a46a2f 100644 --- a/Documentation/ABI/testing/sysfs-kernel-mm-damon +++ b/Documentation/ABI/testing/sysfs-kernel-mm-damon @@ -151,6 +151,13 @@ Contact: SeongJae Park Description: Writing to and reading from this file sets and gets the action of the scheme. =20 +What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//ap= ply_interval_us +Date: Sep 2023 +Contact: SeongJae Park +Description: Writing a value to this file sets the action apply interval of + the scheme in microseconds. Reading this file returns the + value. + What: /sys/kernel/mm/damon/admin/kdamonds//contexts//schemes//ac= cess_pattern/sz/min Date: Mar 2022 Contact: SeongJae Park --=20 2.25.1