damon_ctx
struct damon_ctx;
void (*walk_fn)(void *data, struct damon_ctx *ctx,
void (*init)(struct damon_ctx *context);
void (*update)(struct damon_ctx *context);
void (*prepare_access_checks)(struct damon_ctx *context);
unsigned int (*check_accesses)(struct damon_ctx *context);
int (*get_scheme_score)(struct damon_ctx *context,
unsigned long (*apply_scheme)(struct damon_ctx *context,
void damon_add_scheme(struct damon_ctx *ctx, struct damos *s);
void damon_add_target(struct damon_ctx *ctx, struct damon_target *t);
bool damon_targets_empty(struct damon_ctx *ctx);
void damon_destroy_target(struct damon_target *t, struct damon_ctx *ctx);
struct damon_ctx *damon_new_ctx(void);
void damon_destroy_ctx(struct damon_ctx *ctx);
int damon_set_attrs(struct damon_ctx *ctx, struct damon_attrs *attrs);
void damon_set_schemes(struct damon_ctx *ctx,
int damon_commit_ctx(struct damon_ctx *old_ctx, struct damon_ctx *new_ctx);
int damon_select_ops(struct damon_ctx *ctx, enum damon_ops_id id);
static inline bool damon_target_has_pid(const struct damon_ctx *ctx)
int damon_start(struct damon_ctx **ctxs, int nr_ctxs, bool exclusive);
int damon_stop(struct damon_ctx **ctxs, int nr_ctxs);
bool damon_is_running(struct damon_ctx *ctx);
int damon_kdamond_pid(struct damon_ctx *ctx);
int damon_call(struct damon_ctx *ctx, struct damon_call_control *control);
int damos_walk(struct damon_ctx *ctx, struct damos_walk_control *control);
static struct damos *damon_nth_scheme(int n, struct damon_ctx *ctx)
static int damon_commit_schemes(struct damon_ctx *dst, struct damon_ctx *src)
static struct damon_target *damon_nth_target(int n, struct damon_ctx *ctx)
struct damon_ctx *dst, struct damon_ctx *src)
int damon_commit_ctx(struct damon_ctx *dst, struct damon_ctx *src)
static unsigned long damon_region_sz_limit(struct damon_ctx *ctx)
static int __damon_start(struct damon_ctx *ctx)
int damon_start(struct damon_ctx **ctxs, int nr_ctxs, bool exclusive)
static int __damon_stop(struct damon_ctx *ctx)
int damon_stop(struct damon_ctx **ctxs, int nr_ctxs)
bool damon_is_running(struct damon_ctx *ctx)
int damon_kdamond_pid(struct damon_ctx *ctx)
struct damon_ctx *ctx, struct damon_call_control *control)
int damon_call(struct damon_ctx *ctx, struct damon_call_control *control)
int damos_walk(struct damon_ctx *ctx, struct damos_walk_control *control)
static void kdamond_reset_aggregated(struct damon_ctx *c)
static unsigned long damon_get_intervals_score(struct damon_ctx *c)
static unsigned long damon_get_intervals_adaptation_bp(struct damon_ctx *c)
static void kdamond_tune_intervals(struct damon_ctx *c)
static bool damos_valid_target(struct damon_ctx *c, struct damon_target *t,
static bool damos_filter_match(struct damon_ctx *ctx, struct damon_target *t,
static bool damos_core_filter_out(struct damon_ctx *ctx, struct damon_target *t,
static void damos_walk_call_walk(struct damon_ctx *ctx, struct damon_target *t,
static void damos_walk_complete(struct damon_ctx *ctx, struct damos *s)
static void damos_walk_cancel(struct damon_ctx *ctx)
static void damos_apply_scheme(struct damon_ctx *c, struct damon_target *t,
static void damon_do_apply_schemes(struct damon_ctx *c,
static void damos_trace_esz(struct damon_ctx *c, struct damos *s,
static void damos_adjust_quota(struct damon_ctx *c, struct damos *s)
static void damos_trace_stat(struct damon_ctx *c, struct damos *s)
static void kdamond_apply_schemes(struct damon_ctx *c)
static void kdamond_merge_regions(struct damon_ctx *c, unsigned int threshold,
static void kdamond_split_regions(struct damon_ctx *ctx)
static bool kdamond_need_stop(struct damon_ctx *ctx)
static void kdamond_call(struct damon_ctx *ctx, bool cancel)
static int kdamond_wait_activation(struct damon_ctx *ctx)
static void kdamond_init_ctx(struct damon_ctx *ctx)
struct damon_ctx *ctx = data;
static void damos_set_next_apply_sis(struct damos *s, struct damon_ctx *ctx)
void damon_add_scheme(struct damon_ctx *ctx, struct damos *s)
void damon_add_target(struct damon_ctx *ctx, struct damon_target *t)
bool damon_targets_empty(struct damon_ctx *ctx)
void damon_destroy_target(struct damon_target *t, struct damon_ctx *ctx)
struct damon_ctx *damon_new_ctx(void)
struct damon_ctx *ctx;
static void damon_destroy_targets(struct damon_ctx *ctx)
void damon_destroy_ctx(struct damon_ctx *ctx)
static void damon_update_monitoring_results(struct damon_ctx *ctx,
int damon_set_attrs(struct damon_ctx *ctx, struct damon_attrs *attrs)
void damon_set_schemes(struct damon_ctx *ctx, struct damos **schemes,
int damon_select_ops(struct damon_ctx *ctx, enum damon_ops_id id)
static struct damon_ctx *ctx;
struct damon_ctx *param_ctx;
struct damon_ctx *c = arg;
int damon_modules_new_paddr_ctx_target(struct damon_ctx **ctxp,
struct damon_ctx *ctx;
int damon_modules_new_paddr_ctx_target(struct damon_ctx **ctxp,
int damon_hot_score(struct damon_ctx *c, struct damon_region *r,
int damon_cold_score(struct damon_ctx *c, struct damon_region *r,
int damon_cold_score(struct damon_ctx *c, struct damon_region *r,
int damon_hot_score(struct damon_ctx *c, struct damon_region *r,
static unsigned int damon_pa_check_accesses(struct damon_ctx *ctx)
static unsigned long damon_pa_apply_scheme(struct damon_ctx *ctx,
static int damon_pa_scheme_score(struct damon_ctx *context,
static void damon_pa_prepare_access_checks(struct damon_ctx *ctx)
static struct damon_ctx *ctx;
struct damon_ctx *param_ctx;
struct damon_ctx *c = arg;
static void damon_stat_set_idletime_percentiles(struct damon_ctx *c)
struct damon_ctx *c = data;
static struct damon_ctx *damon_stat_build_ctx(void)
struct damon_ctx *ctx;
static struct damon_ctx *damon_stat_context;
static void damon_stat_set_estimated_memory_bandwidth(struct damon_ctx *c)
static int damon_stat_sort_regions(struct damon_ctx *c,
int damon_sysfs_add_schemes(struct damon_ctx *ctx,
struct damon_ctx *ctx);
struct damon_ctx *ctx, struct damon_target *t,
struct damon_ctx *ctx);
struct damon_ctx *ctx);
struct damon_ctx *ctx)
struct damon_ctx *ctx)
int damon_sysfs_add_schemes(struct damon_ctx *ctx,
struct damon_ctx *ctx)
struct damon_ctx *ctx, struct damon_target *t,
struct damon_ctx *damon_ctx;
struct damon_ctx *ctx;
ctx = kdamond->damon_ctx;
static int damon_sysfs_set_attrs(struct damon_ctx *ctx,
struct damon_ctx *ctx)
static int damon_sysfs_add_targets(struct damon_ctx *ctx,
struct damon_ctx *ctx = kdamond->damon_ctx;
return kdamond->damon_ctx &&
damon_is_running(kdamond->damon_ctx);
static int damon_sysfs_apply_inputs(struct damon_ctx *ctx,
static struct damon_ctx *damon_sysfs_build_ctx(
static struct damon_ctx *damon_sysfs_new_test_ctx(
struct damon_ctx *running_ctx)
struct damon_ctx *test_ctx;
struct damon_ctx *param_ctx, *test_ctx;
test_ctx = damon_sysfs_new_test_ctx(kdamond->damon_ctx);
err = damon_commit_ctx(kdamond->damon_ctx, param_ctx);
struct damon_ctx *ctx;
ctx = sysfs_kdamond->damon_ctx;
struct damon_ctx *ctx = kdamond->damon_ctx;
struct damon_ctx *ctx = kdamond->damon_ctx;
static struct damon_ctx *damon_sysfs_build_ctx(
struct damon_ctx *ctx = damon_new_ctx();
struct damon_ctx *ctx;
if (kdamond->damon_ctx)
damon_destroy_ctx(kdamond->damon_ctx);
kdamond->damon_ctx = NULL;
kdamond->damon_ctx = ctx;
if (!kdamond->damon_ctx)
return damon_stop(&kdamond->damon_ctx, 1);
if (!kdamond->damon_ctx)
err = damon_call(kdamond->damon_ctx, &call_control);
static void damon_sysfs_schemes_tried_regions_upd_one(void *data, struct damon_ctx *ctx,
struct damon_ctx *ctx = sysfs_kdamond->damon_ctx;
struct damon_ctx *ctx;
ctx = kdamond->damon_ctx;
if (kdamond->damon_ctx)
damon_destroy_ctx(kdamond->damon_ctx);
struct damon_ctx *c = damon_new_ctx();
static unsigned int nr_damon_targets(struct damon_ctx *ctx)
struct damon_ctx *c = damon_new_ctx();
struct damon_ctx *c = damon_new_ctx();
struct damon_ctx *ctx = damon_new_ctx();
static unsigned int nr_damon_targets(struct damon_ctx *ctx)
struct damon_ctx *ctx;
static void __damon_va_init_regions(struct damon_ctx *ctx,
static void damon_va_init(struct damon_ctx *ctx)
static void damon_va_update(struct damon_ctx *ctx)
static void damon_va_prepare_access_checks(struct damon_ctx *ctx)
static unsigned int damon_va_check_accesses(struct damon_ctx *ctx)
static unsigned long damon_va_apply_scheme(struct damon_ctx *ctx,
static int damon_va_scheme_score(struct damon_ctx *context,
struct damon_ctx *ctx;
static struct damon_ctx *ctxs[2];
static struct damon_ctx *damon_sample_mtier_build_ctx(bool promote)
struct damon_ctx *ctx;
static struct damon_ctx *ctx;
struct damon_ctx *c = data;
static struct damon_ctx *ctx;
struct damon_ctx *c = data;