Skip to content

Commit 105f830

Browse files
sjp38akpm00
authored andcommitted
mm/damon: remove damon_operations->reset_aggregated
The operations layer hook was introduced to let operations set do any aggregation data reset if needed. But it is not really be used now. Remove it. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: SeongJae Park <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 99ce7c9 commit 105f830

File tree

4 files changed

+1
-10
lines changed

4 files changed

+1
-10
lines changed

include/linux/damon.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,6 @@ enum damon_ops_id {
542542
* @update: Update operations-related data structures.
543543
* @prepare_access_checks: Prepare next access check of target regions.
544544
* @check_accesses: Check the accesses to target regions.
545-
* @reset_aggregated: Reset aggregated accesses monitoring results.
546545
* @get_scheme_score: Get the score of a region for a scheme.
547546
* @apply_scheme: Apply a DAMON-based operation scheme.
548547
* @target_valid: Determine if the target is valid.
@@ -554,8 +553,7 @@ enum damon_ops_id {
554553
* (&damon_ctx.kdamond) calls @init and @prepare_access_checks before starting
555554
* the monitoring, @update after each &damon_attrs.ops_update_interval, and
556555
* @check_accesses, @target_valid and @prepare_access_checks after each
557-
* &damon_attrs.sample_interval. Finally, @reset_aggregated is called after
558-
* each &damon_attrs.aggr_interval.
556+
* &damon_attrs.sample_interval.
559557
*
560558
* Each &struct damon_operations instance having valid @id can be registered
561559
* via damon_register_ops() and selected by damon_select_ops() later.
@@ -570,8 +568,6 @@ enum damon_ops_id {
570568
* last preparation and update the number of observed accesses of each region.
571569
* It should also return max number of observed accesses that made as a result
572570
* of its update. The value will be used for regions adjustment threshold.
573-
* @reset_aggregated should reset the access monitoring results that aggregated
574-
* by @check_accesses.
575571
* @get_scheme_score should return the priority score of a region for a scheme
576572
* as an integer in [0, &DAMOS_MAX_SCORE].
577573
* @apply_scheme is called from @kdamond when a region for user provided
@@ -589,7 +585,6 @@ struct damon_operations {
589585
void (*update)(struct damon_ctx *context);
590586
void (*prepare_access_checks)(struct damon_ctx *context);
591587
unsigned int (*check_accesses)(struct damon_ctx *context);
592-
void (*reset_aggregated)(struct damon_ctx *context);
593588
int (*get_scheme_score)(struct damon_ctx *context,
594589
struct damon_target *t, struct damon_region *r,
595590
struct damos *scheme);

mm/damon/core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2490,8 +2490,6 @@ static int kdamond_fn(void *data)
24902490

24912491
kdamond_reset_aggregated(ctx);
24922492
kdamond_split_regions(ctx);
2493-
if (ctx->ops.reset_aggregated)
2494-
ctx->ops.reset_aggregated(ctx);
24952493
}
24962494

24972495
if (ctx->passed_sample_intervals >= next_ops_update_sis) {

mm/damon/paddr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,6 @@ static int __init damon_pa_initcall(void)
621621
.update = NULL,
622622
.prepare_access_checks = damon_pa_prepare_access_checks,
623623
.check_accesses = damon_pa_check_accesses,
624-
.reset_aggregated = NULL,
625624
.target_valid = NULL,
626625
.cleanup = NULL,
627626
.apply_scheme = damon_pa_apply_scheme,

mm/damon/vaddr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,6 @@ static int __init damon_va_initcall(void)
710710
.update = damon_va_update,
711711
.prepare_access_checks = damon_va_prepare_access_checks,
712712
.check_accesses = damon_va_check_accesses,
713-
.reset_aggregated = NULL,
714713
.target_valid = damon_va_target_valid,
715714
.cleanup = NULL,
716715
.apply_scheme = damon_va_apply_scheme,

0 commit comments

Comments
 (0)