Lines Matching +full:- +full:- +full:target +full:- +full:list
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_size_range - Represents size for filter to operate on [@min, @max].
49 * struct damon_region - Represents a monitoring target region.
55 * @list: List head for siblings.
58 * @nr_accesses is reset to zero for every &damon_attrs->aggr_interval and be
59 * increased for every &damon_attrs->sample_interval if an access to the region
65 * (1 in 10,000) that updated for every &damon_attrs->sample_interval in a
67 * @nr_accesses * 10000 for every &struct damon_attrs->aggr_interval. This can
74 * region are set as region size-weighted average of those of the two regions.
81 struct list_head list; member
89 * struct damon_target - Represents a monitoring target.
91 * @nr_regions: Number of monitoring target regions of this target.
92 * @regions_list: Head of the monitoring target regions of this target.
93 * @list: List head for siblings.
96 * for virtual memory address spaces could have multiple target processes. The
104 struct list_head list; member
108 * enum damos_action - Represents an action of a Data Access Monitoring-based
144 * enum damos_quota_goal_metric - Represents the metric to be used as the goal
146 * @DAMOS_QUOTA_USER_INPUT: User-input value.
159 * struct damos_quota_goal - DAMOS scheme quota auto-tuning goal.
161 * @target_value: Target value of @metric to achieve with the tuning.
164 * @list: List head for siblings.
169 * auto-tuned quota.
173 * DAMON sets @current_value with self-measured value of @metric.
179 /* metric-dependent fields */
183 struct list_head list; member
187 * struct damos_quota - Controls the aggressiveness of the given scheme.
191 * @goals: Head of quota tuning goals (&damos_quota_goal) list.
199 * &struct damos->action to large memory, DAMON allows users to set time and/or
200 * size quotas. The quotas can be set by writing non-zero values to &ms and
223 * target memory regions using the &struct damon_operations->get_scheme_score.
258 * enum damos_wmark_metric - Represents the watermark metric.
271 * struct damos_watermarks - Controls when a given scheme should be activated.
299 * struct damos_stat - Statistics on a given scheme.
305 * Total bytes that passed ops layer-handled DAMOS filters.
335 * enum damos_filter_type - Type of memory for &struct damos_filter
343 * @DAMOS_FILTER_TYPE_TARGET: Data Access Monitoring target.
370 * struct damos_filter - DAMOS action target memory filter.
371 * @type: Type of the target memory.
372 * @matching: Whether this is for @type-matching memory.
377 * &damon_ctx->adaptive_targets if @type is
380 * @list: List head for siblings.
382 * Before applying the &damos->action to a memory region, DAMOS checks if each
398 struct list_head list; member
405 * struct damos_walk_control - Control damos_walk().
427 * struct damos_access_pattern - Target access pattern of the given scheme.
428 * @min_sz_region: Minimum size of target regions.
429 * @max_sz_region: Maximum size of target regions.
430 * @min_nr_accesses: Minimum ``->nr_accesses`` of target regions.
431 * @max_nr_accesses: Maximum ``->nr_accesses`` of target regions.
432 * @min_age_region: Minimum age of target regions.
433 * @max_age_region: Maximum age of target regions.
445 * struct damos - Represents a Data Access Monitoring-based Operation Scheme.
446 * @pattern: Access pattern of target regions.
447 * @action: &damo_action to be applied to the target regions.
453 * @ops_filters: ops layer handling &struct damos_filter objects list.
454 * @last_applied: Last @action applied ops-managing entity.
456 * @list: List head for siblings.
462 * If @apply_interval_us is zero, &damon_attrs->aggr_interval is used instead.
469 * @target_nid is used to set the migration target node for migrate_hot or
504 * layer-handled filters. If true, operations layer allows it, too.
520 struct list_head list; member
524 * enum damon_ops_id - Identifier for each monitoring operations implementation
540 * struct damon_operations - Monitoring operations for given use cases.
543 * @init: Initialize operations-related data structures.
544 * @update: Update operations-related data structures.
545 * @prepare_access_checks: Prepare next access check of target regions.
546 * @check_accesses: Check the accesses to target regions.
548 * @apply_scheme: Apply a DAMON-based operation scheme.
549 * @target_valid: Determine if the target is valid.
553 * users should register the low level operations for their target address
562 * @init should initialize operations-related data structures. For example,
563 * this could be used to construct proper monitoring target regions and link
565 * @update should update the operations-related data structures. For example,
566 * this could be used to update monitoring target regions for current status.
576 * DAMON-based operation scheme is found. It should apply the scheme's action
580 * @target_valid should check whether the target is still valid for the
601 * struct damon_callback - Monitoring events notification callbacks.
610 * The monitoring thread calls @after_wmarks_check after each DAMON-based
620 * If any callback returns non-zero, monitoring stops.
629 * struct damon_call_control - Control damon_call().
650 * struct damon_intervals_goal - Monitoring intervals auto-tuning goal.
657 * DAMON automatically tunes &damon_attrs->sample_interval and
658 * &damon_attrs->aggr_interval aiming the ratio in bp (1/10,000) of
659 * DAMON-observed access events to theoretical maximum amount within @aggrs
661 * &damon_attrs->aggr_interval and &damon_attrs->sampling_interval in same
663 * target for each @aggrs aggregations, and vice versa.
675 * struct damon_attrs - Monitoring attributes for accuracy/overhead control.
680 * @intervals_goal: Intervals auto-tuning goal.
688 * aggregates the information by increasing &damon_region->nr_accesses for
690 * also checks whether the target memory regions need update (e.g., by
693 * are in micro-seconds. Please refer to &struct damon_operations and &struct
706 * Core-external components call damon_set_attrs() with &damon_attrs
708 * field of resulting &damon_attrs. Core-internal components such as
717 * struct damon_ctx - Represents a context for each monitoring. This is the
729 * terminated or every monitoring target is invalid. The validity of the
743 * @adaptive_targets: Head of monitoring targets (&damon_target) list.
744 * @schemes: Head of schemes (&damos) list.
791 return container_of(r->list.next, struct damon_region, list); in damon_next_region()
796 return container_of(r->list.prev, struct damon_region, list); in damon_prev_region()
801 return list_last_entry(&t->regions_list, struct damon_region, list); in damon_last_region()
806 return list_first_entry(&t->regions_list, struct damon_region, list); in damon_first_region()
811 return r->ar.end - r->ar.start; in damon_sz_region()
816 list_for_each_entry(r, &t->regions_list, list)
819 list_for_each_entry_from(r, &t->regions_list, list)
822 list_for_each_entry_safe(r, next, &t->regions_list, list)
825 list_for_each_entry(t, &(ctx)->adaptive_targets, list)
828 list_for_each_entry_safe(t, next, &(ctx)->adaptive_targets, list)
831 list_for_each_entry(s, &(ctx)->schemes, list)
834 list_for_each_entry_safe(s, next, &(ctx)->schemes, list)
837 list_for_each_entry(goal, "a->goals, list)
840 list_for_each_entry_safe(goal, next, &(quota)->goals, list)
843 list_for_each_entry(f, &(scheme)->filters, list)
846 list_for_each_entry_safe(f, next, &(scheme)->filters, list)
849 list_for_each_entry(f, &(scheme)->ops_filters, list)
852 list_for_each_entry_safe(f, next, &(scheme)->ops_filters, list)
865 __list_add(&r->list, &prev->list, &next->list); in damon_insert_region()
866 t->nr_regions++; in damon_insert_region()
918 return ctx->ops.id == DAMON_OPS_VADDR || ctx->ops.id == DAMON_OPS_FVADDR; in damon_target_has_pid()
924 return min(attrs->aggr_interval / attrs->sample_interval, in damon_max_nr_accesses()