Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/damon: remove unused target param of get_scheme_score()

damon_target is not used by get_scheme_score operations, nor with virtual
neither with physical addresses.

Link: https://lkml.kernel.org/r/20260213145032.1740407-1-gutierrez.asier@huawei-partners.com
Signed-off-by: Asier Gutierrez <gutierrez.asier@huawei-partners.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Quanmin Yan <yanquanmin1@huawei.com>
Cc: ze zuo <zuoze1@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Asier Gutierrez and committed by
Andrew Morton
c9cb94c6 8a552d68

+8 -11
+1 -2
include/linux/damon.h
··· 647 647 void (*prepare_access_checks)(struct damon_ctx *context); 648 648 unsigned int (*check_accesses)(struct damon_ctx *context); 649 649 int (*get_scheme_score)(struct damon_ctx *context, 650 - struct damon_target *t, struct damon_region *r, 651 - struct damos *scheme); 650 + struct damon_region *r, struct damos *scheme); 652 651 unsigned long (*apply_scheme)(struct damon_ctx *context, 653 652 struct damon_target *t, struct damon_region *r, 654 653 struct damos *scheme, unsigned long *sz_filter_passed);
+5 -5
mm/damon/core.c
··· 1689 1689 r->age <= s->pattern.max_age_region; 1690 1690 } 1691 1691 1692 - static bool damos_valid_target(struct damon_ctx *c, struct damon_target *t, 1693 - struct damon_region *r, struct damos *s) 1692 + static bool damos_valid_target(struct damon_ctx *c, struct damon_region *r, 1693 + struct damos *s) 1694 1694 { 1695 1695 bool ret = __damos_valid_target(r, s); 1696 1696 1697 1697 if (!ret || !s->quota.esz || !c->ops.get_scheme_score) 1698 1698 return ret; 1699 1699 1700 - return c->ops.get_scheme_score(c, t, r, s) >= s->quota.min_score; 1700 + return c->ops.get_scheme_score(c, r, s) >= s->quota.min_score; 1701 1701 } 1702 1702 1703 1703 /* ··· 2021 2021 s->max_nr_snapshots <= s->stat.nr_snapshots) 2022 2022 continue; 2023 2023 2024 - if (damos_valid_target(c, t, r, s)) 2024 + if (damos_valid_target(c, r, s)) 2025 2025 damos_apply_scheme(c, t, r, s); 2026 2026 2027 2027 if (damon_is_last_region(r, t)) ··· 2319 2319 damon_for_each_region(r, t) { 2320 2320 if (!__damos_valid_target(r, s)) 2321 2321 continue; 2322 - score = c->ops.get_scheme_score(c, t, r, s); 2322 + score = c->ops.get_scheme_score(c, r, s); 2323 2323 c->regions_score_histogram[score] += 2324 2324 damon_sz_region(r); 2325 2325 if (score > max_score)
+1 -2
mm/damon/paddr.c
··· 343 343 } 344 344 345 345 static int damon_pa_scheme_score(struct damon_ctx *context, 346 - struct damon_target *t, struct damon_region *r, 347 - struct damos *scheme) 346 + struct damon_region *r, struct damos *scheme) 348 347 { 349 348 switch (scheme->action) { 350 349 case DAMOS_PAGEOUT:
+1 -2
mm/damon/vaddr.c
··· 985 985 } 986 986 987 987 static int damon_va_scheme_score(struct damon_ctx *context, 988 - struct damon_target *t, struct damon_region *r, 989 - struct damos *scheme) 988 + struct damon_region *r, struct damos *scheme) 990 989 { 991 990 992 991 switch (scheme->action) {