Lines Matching +full:lock +full:- +full:latency +full:- +full:ns

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
44 * bfq_service_tree. All the fields are protected by the queue lock
65 * struct bfq_sched_data - multi-class scheduler.
75 * queue requests are served according to B-WF2Q+.
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
89 * in-service entity with those of such best candidate.
91 * All fields are protected by the lock of the containing bfqd.
96 /* head-of-line entity (see comments above) */
106 * struct bfq_weight_counter - counter of the number of all active queues
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
142 * guaranteed. All the fields are protected by the queue lock of the
155 /* B-WF2Q+ start and finish timestamps [sectors/weight] */
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.
231 * All the fields are protected by the queue lock of the containing bfqd.
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) */
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.
472 * struct bfq_data - per-device data structure.
474 * All the fields are protected by @lock.
490 * weight-raised @bfq_queue (see the comments to the functions
515 * should be decremented when the in-flight request of the
520 * pending-request counter must be added to entities, and must
544 * Per-class (RT, BE, IDLE) number of bfq_queues containing
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 */
587 /* time of last request completion (ns) */
596 /* time of last transition from empty to non-empty (ns) */
601 * of a just-arrived first I/O request (see
616 /* time of first rq dispatch in current observation interval (ns) */
618 /* time of last rq dispatch in current observation interval (ns) */
639 * [(sectors/usec) / 2^BFQ_RATE_SHIFT]. The left-shift by
641 * fixed-point calculations.
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).
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 */
752 spinlock_t lock; member
757 * be able to perform the bic lookup, needed by bio-merge
758 * functions, before the scheduler lock is taken, and thus
759 * avoid taking the request-queue lock while the scheduler
760 * lock is being held.
785 * bfqq has timed-out at least once
794 * may need softrt-next-start
844 /* total time spent on device in ns, may not be accurate w/ queueing */
846 /* total time spent waiting in scheduler queue in ns */
875 * struct bfq_group_data - per-blkcg storage for the blkio subsystem.
888 * struct bfq_group - per (device, cgroup) data structure.
911 * there is a set of bfq_groups, each one collecting the lower-level
915 * o @bfqd is protected by the queue lock, RCU is used to access it
917 * o All the other fields are protected by the @bfqd queue lock.
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)