Lines Matching +full:field +full:- +full:even +full:- +full:active
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
11 #include <linux/blk-cgroup.h>
13 #include "blk-cgroup-rwstat.h"
31 * Soft real-time applications are extremely more latency sensitive
32 * than interactive ones. Over-raise the weight of the former to
40 * struct bfq_service_tree - per ioprio_class service tree.
42 * Each service tree represents a B-WF2Q+ scheduler on its own. Each
48 /* tree for active entities (i.e., those backlogged) */
49 struct rb_root active; member
60 /* scheduler weight sum; active and idle entities contribute to it */
65 * struct bfq_sched_data - multi-class scheduler.
75 * queue requests are served according to B-WF2Q+.
77 * The schedule is implemented by the service trees, plus the field
78 * @next_in_service, which points to the entity on the active trees
80 * before the current in-service entity is expired, 2) the in-service
82 * in_service_entity is not a queue, then the in-service child entity
87 * service among the other active entities in the same parent
89 * in-service entity with those of such best candidate.
96 /* head-of-line entity (see comments above) */
106 * struct bfq_weight_counter - counter of the number of all active queues
111 unsigned int num_active; /* nr of active queues with this weight */
119 * struct bfq_entity - schedulable entity.
124 * hierarchy. Non-leaf entities have also their own sched_data, stored
138 * "well-behaved" queues (i.e., queues that do not spend too much
150 * Flag, true if the entity is on a tree (either the active or
155 /* B-WF2Q+ start and finish timestamps [sectors/weight] */
162 * minimum start time of the (active) subtree rooted at this
163 * entity; used for O(log N) lookups into active trees
173 /* device weight, if non-zero, it overrides the default weight of
188 * For non-leaf nodes in the hierarchy, the associated
201 /* last child queue of entity created (for non-leaf entities) */
208 * struct bfq_ttime - per process thinktime stats.
223 * struct bfq_queue - leaf schedulable entity.
246 /* last total-service-time sample, see bfq_update_inject_limit() */
258 /* request-position tree member (see bfq_group's @rq_pos_tree) */
260 /* request-position tree root (see bfq_group's @rq_pos_tree) */
293 /* node for active/idle bfqq list inside parent bfqd */
330 /* current maximum weight-raising time for this queue */
336 * queue it is deemed as soft real-time (see the comments on
341 * Start time of the current weight-raising period if
342 * the @bfq-queue is being weight-raised, otherwise
343 * finish time of the last weight-raising period.
360 * last transition to weight-raised state.
403 * struct bfq_io_cq - per (request_queue, io_context) structure.
432 * field keeping the queue's belonging to a large burst
472 * struct bfq_data - per-device data structure.
489 * distinct weight associated to some active and not
490 * weight-raised @bfq_queue (see the comments to the functions
500 * (be larger) than the number of active groups, as a group is
501 * considered active only if its corresponding entity has
515 * should be decremented when the in-flight request of the
518 * terms of composition of the group and active/inactive state of child
520 * pending-request counter must be added to entities, and must
521 * be updated correctly. To avoid this additional field and operations,
529 * Even this simpler decrement strategy requires a little
544 * Per-class (RT, BE, IDLE) number of bfq_queues containing
545 * requests (including the queue in service, even if it is
549 /* number of weight-raised busy @bfq_queues */
581 /* on-disk position of the last served request */
584 /* position of the last served request for the in-service queue */
596 /* time of last transition from empty to non-empty (ns) */
601 * of a just-arrived first I/O request (see
639 * [(sectors/usec) / 2^BFQ_RATE_SHIFT]. The left-shift by
641 * fixed-point calculations.
648 /* list of all the bfq_queues active on the device */
665 /* user-configured max budget value (0 for auto-tuning) */
670 * sequential or quasi-sequential ones (this also implies that
674 * without service-domain guarantees).
681 * issues. CAVEAT: this may even increase latencies, in case
704 /* Maximum burst size above which the current queue-activation
708 /* true if a large queue-activation burst is in progress */
716 /* if set to true, low-latency heuristics are enabled */
719 * Maximum factor by which the weight of a weight-raised queue
723 /* maximum duration of a weight-raising period (jiffies) */
726 /* Maximum weight-raising duration for soft real-time processes */
729 * Minimum idle period after which weight-raising may be
735 * weight-raising may be reactivated for an already busy async
740 /* Max service-rate for a soft real-time queue, in sectors/sec */
756 * merging. This and the next field are used as a support to
757 * be able to perform the bic lookup, needed by bio-merge
759 * avoid taking the request-queue lock while the scheduler
785 * bfqq has timed-out at least once
794 * may need softrt-next-start
862 /* total time with empty current active q with other requests queued */
875 * struct bfq_group_data - per-blkcg storage for the blkio subsystem.
888 * struct bfq_group - per (device, cgroup) data structure.
901 * @active_entities: number of active entities belonging to the group;
903 * are groups with more than one active @bfq_entity
911 * there is a set of bfq_groups, each one collecting the lower-level
958 /* --------------- main algorithm interface ----------------- */
984 /* ------------ end of main algorithm interface -------------- */
986 /* ---------------- cgroups-support interface ---------------- */
1019 /* ------------- end of cgroups-support interface ------------- */
1021 /* - interface of the internal hierarchical B-WF2Q+ scheduler - */
1026 for (; entity ; entity = entity->parent)
1035 for (; entity && ({ parent = entity->parent; 1; }); entity = parent)
1079 /* --------------- end of interface of B-WF2Q+ ---------------- */
1084 if (pid != -1) in bfq_pid_to_str()
1087 snprintf(str, len, "SHARED-"); in bfq_pid_to_str()
1095 if (likely(!blk_trace_note_message_enabled((bfqd)->queue))) \
1097 bfq_pid_to_str((bfqq)->pid, pid_str, MAX_PID_STR_LENGTH); \
1098 blk_add_cgroup_trace_msg((bfqd)->queue, \
1099 bfqg_to_blkg(bfqq_group(bfqq))->blkcg, \
1105 blk_add_cgroup_trace_msg((bfqd)->queue, \
1106 bfqg_to_blkg(bfqg)->blkcg, fmt, ##args); \
1113 if (likely(!blk_trace_note_message_enabled((bfqd)->queue))) \
1115 bfq_pid_to_str((bfqq)->pid, pid_str, MAX_PID_STR_LENGTH); \
1116 blk_add_trace_msg((bfqd)->queue, "bfq%s%c " fmt, pid_str, \
1125 blk_add_trace_msg((bfqd)->queue, "bfq " fmt, ##args)