mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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>
This commit is contained in:
parent
8a552d68a8
commit
c9cb94c6b8
|
|
@ -647,8 +647,7 @@ struct damon_operations {
|
|||
void (*prepare_access_checks)(struct damon_ctx *context);
|
||||
unsigned int (*check_accesses)(struct damon_ctx *context);
|
||||
int (*get_scheme_score)(struct damon_ctx *context,
|
||||
struct damon_target *t, struct damon_region *r,
|
||||
struct damos *scheme);
|
||||
struct damon_region *r, struct damos *scheme);
|
||||
unsigned long (*apply_scheme)(struct damon_ctx *context,
|
||||
struct damon_target *t, struct damon_region *r,
|
||||
struct damos *scheme, unsigned long *sz_filter_passed);
|
||||
|
|
|
|||
|
|
@ -1689,15 +1689,15 @@ static bool __damos_valid_target(struct damon_region *r, struct damos *s)
|
|||
r->age <= s->pattern.max_age_region;
|
||||
}
|
||||
|
||||
static bool damos_valid_target(struct damon_ctx *c, struct damon_target *t,
|
||||
struct damon_region *r, struct damos *s)
|
||||
static bool damos_valid_target(struct damon_ctx *c, struct damon_region *r,
|
||||
struct damos *s)
|
||||
{
|
||||
bool ret = __damos_valid_target(r, s);
|
||||
|
||||
if (!ret || !s->quota.esz || !c->ops.get_scheme_score)
|
||||
return ret;
|
||||
|
||||
return c->ops.get_scheme_score(c, t, r, s) >= s->quota.min_score;
|
||||
return c->ops.get_scheme_score(c, r, s) >= s->quota.min_score;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -2021,7 +2021,7 @@ static void damon_do_apply_schemes(struct damon_ctx *c,
|
|||
s->max_nr_snapshots <= s->stat.nr_snapshots)
|
||||
continue;
|
||||
|
||||
if (damos_valid_target(c, t, r, s))
|
||||
if (damos_valid_target(c, r, s))
|
||||
damos_apply_scheme(c, t, r, s);
|
||||
|
||||
if (damon_is_last_region(r, t))
|
||||
|
|
@ -2319,7 +2319,7 @@ static void damos_adjust_quota(struct damon_ctx *c, struct damos *s)
|
|||
damon_for_each_region(r, t) {
|
||||
if (!__damos_valid_target(r, s))
|
||||
continue;
|
||||
score = c->ops.get_scheme_score(c, t, r, s);
|
||||
score = c->ops.get_scheme_score(c, r, s);
|
||||
c->regions_score_histogram[score] +=
|
||||
damon_sz_region(r);
|
||||
if (score > max_score)
|
||||
|
|
|
|||
|
|
@ -343,8 +343,7 @@ static unsigned long damon_pa_apply_scheme(struct damon_ctx *ctx,
|
|||
}
|
||||
|
||||
static int damon_pa_scheme_score(struct damon_ctx *context,
|
||||
struct damon_target *t, struct damon_region *r,
|
||||
struct damos *scheme)
|
||||
struct damon_region *r, struct damos *scheme)
|
||||
{
|
||||
switch (scheme->action) {
|
||||
case DAMOS_PAGEOUT:
|
||||
|
|
|
|||
|
|
@ -985,8 +985,7 @@ static unsigned long damon_va_apply_scheme(struct damon_ctx *ctx,
|
|||
}
|
||||
|
||||
static int damon_va_scheme_score(struct damon_ctx *context,
|
||||
struct damon_target *t, struct damon_region *r,
|
||||
struct damos *scheme)
|
||||
struct damon_region *r, struct damos *scheme)
|
||||
{
|
||||
|
||||
switch (scheme->action) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user