Lines Matching +full:charging +full:- +full:algorithm

1 /* SPDX-License-Identifier: GPL-2.0 */
19 /* Max priority score for DAMON-based operation schemes */
25 return l + get_random_u32_below(r - l); in damon_rand()
29 * struct damon_addr_range - Represents an address region of [@start, @end).
39 * struct damon_region - Represents a monitoring target region.
48 * @nr_accesses is reset to zero for every &damon_attrs->aggr_interval and be
49 * increased for every &damon_attrs->sample_interval if an access to the region
55 * (1 in 10,000) that updated for every &damon_attrs->sample_interval in a
56 * manner similar to moving sum. By the algorithm, this value becomes
57 * @nr_accesses * 10000 for every &struct damon_attrs->aggr_interval. This can
64 * region are set as region size-weighted average of those of the two regions.
79 * struct damon_target - Represents a monitoring target.
98 * enum damos_action - Represents an action of a Data Access Monitoring-based
134 * enum damos_quota_goal_metric - Represents the metric to be used as the goal
136 * @DAMOS_QUOTA_USER_INPUT: User-input value.
149 * struct damos_quota_goal - DAMOS scheme quota auto-tuning goal.
159 * auto-tuned quota.
163 * DAMON sets @current_value with self-measured value of @metric.
169 /* metric-dependent fields */
177 * struct damos_quota - Controls the aggressiveness of the given scheme.
189 * &struct damos->action to large memory, DAMON allows users to set time and/or
190 * size quotas. The quotas can be set by writing non-zero values to &ms and
201 * goals using its internal feedback loop algorithm, for every @reset_interval.
208 * target memory regions using the &struct damon_operations->get_scheme_score.
229 /* For charging the quota */
243 * enum damos_wmark_metric - Represents the watermark metric.
256 * struct damos_watermarks - Controls when a given scheme should be activated.
284 * struct damos_stat - Statistics on a given scheme.
300 * enum damos_filter_type - Type of memory for &struct damos_filter
329 * struct damos_filter - DAMOS action target memory filter.
335 * &damon_ctx->adaptive_targets if @type is
339 * Before applying the &damos->action to a memory region, DAMOS checks if each
356 * struct damos_access_pattern - Target access pattern of the given scheme.
359 * @min_nr_accesses: Minimum ``->nr_accesses`` of target regions.
360 * @max_nr_accesses: Maximum ``->nr_accesses`` of target regions.
374 * struct damos - Represents a Data Access Monitoring-based Operation Scheme.
389 * If @apply_interval_us is zero, &damon_attrs->aggr_interval is used instead.
430 * enum damon_ops_id - Identifier for each monitoring operations implementation
448 * struct damon_operations - Monitoring operations for given use cases.
451 * @init: Initialize operations-related data structures.
452 * @update: Update operations-related data structures.
457 * @apply_scheme: Apply a DAMON-based operation scheme.
472 * @init should initialize operations-related data structures. For example,
475 * @update should update the operations-related data structures. For example,
488 * DAMON-based operation scheme is found. It should apply the scheme's action
513 * struct damon_callback - Monitoring events notification callbacks.
528 * The monitoring thread calls @after_wmarks_check after each DAMON-based
539 * If any callback returns non-zero, monitoring stops.
556 * struct damon_attrs - Monitoring attributes for accuracy/overhead control.
568 * aggregates the information by increasing &damon_region->nr_accesses for
573 * are in micro-seconds. Please refer to &struct damon_operations and &struct
585 * struct damon_ctx - Represents a context for each monitoring. This is the
648 return container_of(r->list.next, struct damon_region, list); in damon_next_region()
653 return container_of(r->list.prev, struct damon_region, list); in damon_prev_region()
658 return list_last_entry(&t->regions_list, struct damon_region, list); in damon_last_region()
663 return list_first_entry(&t->regions_list, struct damon_region, list); in damon_first_region()
668 return r->ar.end - r->ar.start; in damon_sz_region()
673 list_for_each_entry(r, &t->regions_list, list)
676 list_for_each_entry_from(r, &t->regions_list, list)
679 list_for_each_entry_safe(r, next, &t->regions_list, list)
682 list_for_each_entry(t, &(ctx)->adaptive_targets, list)
685 list_for_each_entry_safe(t, next, &(ctx)->adaptive_targets, list)
688 list_for_each_entry(s, &(ctx)->schemes, list)
691 list_for_each_entry_safe(s, next, &(ctx)->schemes, list)
694 list_for_each_entry(goal, &quota->goals, list)
697 list_for_each_entry_safe(goal, next, &(quota)->goals, list)
700 list_for_each_entry(f, &(scheme)->filters, list)
703 list_for_each_entry_safe(f, next, &(scheme)->filters, list)
716 __list_add(&r->list, &prev->list, &next->list); in damon_insert_region()
717 t->nr_regions++; in damon_insert_region()
768 return ctx->ops.id == DAMON_OPS_VADDR || ctx->ops.id == DAMON_OPS_FVADDR; in damon_target_has_pid()
774 return min(attrs->aggr_interval / attrs->sample_interval, in damon_max_nr_accesses()