Lines Matching +full:monitor +full:- +full:interval +full:- +full:ms

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.
44 * each sampling interval.
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
50 * during the last sampling interval is found. The update of this field should
55 * (1 in 10,000) that updated for every &damon_attrs->sample_interval in a
57 * @nr_accesses * 10000 for every &struct damon_attrs->aggr_interval. This can
58 * be used when the aggregation interval is too huge and therefore cannot wait
61 * @age is initially zero, increased for each aggregation interval, and reset
64 * region are set as region size-weighted average of those of the two regions.
79 * struct damon_target - Represents a monitoring target.
80 * @pid: The PID of the virtual address space to monitor.
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.
178 * @reset_interval: Charge reset interval in milliseconds.
179 * @ms: Maximum milliseconds that the scheme can use.
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
192 * &ms milliseconds within &reset_interval for applying the action. If the
213 * target memory regions using the &struct damon_operations->get_scheme_score.
220 unsigned long ms; member
248 * enum damos_wmark_metric - Represents the watermark metric.
261 * struct damos_watermarks - Controls when a given scheme should be activated.
263 * @interval: Watermarks check time interval in microseconds.
271 * least every &interval microseconds and works as below.
279 unsigned long interval; member
289 * struct damos_stat - Statistics on a given scheme.
295 * Total bytes that passed ops layer-handled DAMOS filters.
325 * enum damos_filter_type - Type of memory for &struct damos_filter
354 * struct damos_filter - DAMOS action target memory filter.
356 * @matching: Whether this is for @type-matching memory.
361 * &damon_ctx->adaptive_targets if @type is
365 * Before applying the &damos->action to a memory region, DAMOS checks if each
387 * struct damos_walk_control - Control damos_walk().
409 * struct damos_access_pattern - Target access pattern of the given scheme.
412 * @min_nr_accesses: Minimum ``->nr_accesses`` of target regions.
413 * @max_nr_accesses: Maximum ``->nr_accesses`` of target regions.
427 * struct damos - Represents a Data Access Monitoring-based Operation Scheme.
435 * @last_applied: Last @action applied ops-managing entity.
443 * If @apply_interval_us is zero, &damon_attrs->aggr_interval is used instead.
485 * layer-handled filters. If true, operations layer allows it, too.
501 * enum damon_ops_id - Identifier for each monitoring operations implementation
517 * struct damon_operations - Monitoring operations for given use cases.
520 * @init: Initialize operations-related data structures.
521 * @update: Update operations-related data structures.
526 * @apply_scheme: Apply a DAMON-based operation scheme.
541 * @init should initialize operations-related data structures. For example,
544 * @update should update the operations-related data structures. For example,
557 * DAMON-based operation scheme is found. It should apply the scheme's action
583 * struct damon_callback - Monitoring events notification callbacks.
598 * The monitoring thread calls @after_wmarks_check after each DAMON-based
609 * If any callback returns non-zero, monitoring stops.
626 * struct damon_call_control - Control damon_call().
647 * struct damon_attrs - Monitoring attributes for accuracy/overhead control.
650 * @aggr_interval: The time between monitor results aggregations.
659 * aggregates the information by increasing &damon_region->nr_accesses for
664 * are in micro-seconds. Please refer to &struct damon_operations and &struct
676 * struct damon_ctx - Represents a context for each monitoring. This is the
745 return container_of(r->list.next, struct damon_region, list); in damon_next_region()
750 return container_of(r->list.prev, struct damon_region, list); in damon_prev_region()
755 return list_last_entry(&t->regions_list, struct damon_region, list); in damon_last_region()
760 return list_first_entry(&t->regions_list, struct damon_region, list); in damon_first_region()
765 return r->ar.end - r->ar.start; in damon_sz_region()
770 list_for_each_entry(r, &t->regions_list, list)
773 list_for_each_entry_from(r, &t->regions_list, list)
776 list_for_each_entry_safe(r, next, &t->regions_list, list)
779 list_for_each_entry(t, &(ctx)->adaptive_targets, list)
782 list_for_each_entry_safe(t, next, &(ctx)->adaptive_targets, list)
785 list_for_each_entry(s, &(ctx)->schemes, list)
788 list_for_each_entry_safe(s, next, &(ctx)->schemes, list)
791 list_for_each_entry(goal, &quota->goals, list)
794 list_for_each_entry_safe(goal, next, &(quota)->goals, list)
797 list_for_each_entry(f, &(scheme)->filters, list)
800 list_for_each_entry_safe(f, next, &(scheme)->filters, list)
813 __list_add(&r->list, &prev->list, &next->list); in damon_insert_region()
814 t->nr_regions++; in damon_insert_region()
865 return ctx->ops.id == DAMON_OPS_VADDR || ctx->ops.id == DAMON_OPS_FVADDR; in damon_target_has_pid()
871 return min(attrs->aggr_interval / attrs->sample_interval, in damon_max_nr_accesses()