Lines Matching +full:lock +full:- +full:latency +full:- +full:ns
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
12 #include "blk-cgroup-rwstat.h"
30 * Soft real-time applications are extremely more latency sensitive
31 * than interactive ones. Over-raise the weight of the former to
39 * struct bfq_service_tree - per ioprio_class service tree.
41 * Each service tree represents a B-WF2Q+ scheduler on its own. Each
43 * bfq_service_tree. All the fields are protected by the queue lock
64 * struct bfq_sched_data - multi-class scheduler.
74 * queue requests are served according to B-WF2Q+.
79 * before the current in-service entity is expired, 2) the in-service
81 * in_service_entity is not a queue, then the in-service child entity
88 * in-service entity with those of such best candidate.
90 * All fields are protected by the lock of the containing bfqd.
95 /* head-of-line entity (see comments above) */
105 * struct bfq_weight_counter - counter of the number of all active queues
118 * struct bfq_entity - schedulable entity.
123 * hierarchy. Non-leaf entities have also their own sched_data, stored
137 * "well-behaved" queues (i.e., queues that do not spend too much
141 * guaranteed. All the fields are protected by the queue lock of the
154 /* B-WF2Q+ start and finish timestamps [sectors/weight] */
175 /* device weight, if non-zero, it overrides the default weight of
190 * For non-leaf nodes in the hierarchy, the associated
203 /* last child queue of entity created (for non-leaf entities) */
210 * struct bfq_ttime - per process thinktime stats.
225 * struct bfq_queue - leaf schedulable entity.
233 * All the fields are protected by the queue lock of the containing bfqd.
248 /* last total-service-time sample, see bfq_update_inject_limit() */
260 /* request-position tree member (see bfq_group's @rq_pos_tree) */
262 /* 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.
401 * struct bfq_io_cq - per (request_queue, io_context) structure.
471 * struct bfq_data - per-device data structure.
473 * All the fields are protected by @lock.
489 * weight-raised @bfq_queue (see the comments to the functions
514 * should be decremented when the in-flight request of the
519 * pending-request counter must be added to entities, and must
543 * Per-class (RT, BE, IDLE) number of bfq_queues containing
548 /* number of weight-raised busy @bfq_queues */
580 /* on-disk position of the last served request */
583 /* position of the last served request for the in-service queue */
586 /* time of last request completion (ns) */
595 /* time of last transition from empty to non-empty (ns) */
600 * of a just-arrived first I/O request (see
615 /* time of first rq dispatch in current observation interval (ns) */
617 /* time of last rq dispatch in current observation interval (ns) */
638 * [(sectors/usec) / 2^BFQ_RATE_SHIFT]. The left-shift by
640 * fixed-point calculations.
664 /* user-configured max budget value (0 for auto-tuning) */
669 * sequential or quasi-sequential ones (this also implies that
673 * without service-domain guarantees).
703 /* Maximum burst size above which the current queue-activation
707 /* true if a large queue-activation burst is in progress */
715 /* if set to true, low-latency heuristics are enabled */
718 * Maximum factor by which the weight of a weight-raised queue
722 /* maximum duration of a weight-raising period (jiffies) */
725 /* Maximum weight-raising duration for soft real-time processes */
728 * Minimum idle period after which weight-raising may be
734 * weight-raising may be reactivated for an already busy async
739 /* Max service-rate for a soft real-time queue, in sectors/sec */
751 spinlock_t lock; member
756 * be able to perform the bic lookup, needed by bio-merge
757 * functions, before the scheduler lock is taken, and thus
758 * avoid taking the request-queue lock while the scheduler
759 * 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.
960 /* --------------- main algorithm interface ----------------- */
987 /* ------------ end of main algorithm interface -------------- */
989 /* ---------------- cgroups-support interface ---------------- */
1024 /* ------------- end of cgroups-support interface ------------- */
1026 /* - interface of the internal hierarchical B-WF2Q+ scheduler - */
1031 for (; entity ; entity = entity->parent)
1040 for (; entity && ({ parent = entity->parent; 1; }); entity = parent)
1082 /* --------------- end of interface of B-WF2Q+ ---------------- */
1089 if (bfqq->pid != -1) in bfq_bfqq_name()
1090 snprintf(str, len, "bfq%d%c", bfqq->pid, type); in bfq_bfqq_name()
1092 snprintf(str, len, "bfqSHARED-%c", type); in bfq_bfqq_name()
1100 if (likely(!blk_trace_note_message_enabled((bfqd)->queue))) \
1103 blk_add_cgroup_trace_msg((bfqd)->queue, \
1104 &bfqg_to_blkg(bfqq_group(bfqq))->blkcg->css, \
1109 blk_add_cgroup_trace_msg((bfqd)->queue, \
1110 &bfqg_to_blkg(bfqg)->blkcg->css, fmt, ##args); \
1117 if (likely(!blk_trace_note_message_enabled((bfqd)->queue))) \
1120 blk_add_trace_msg((bfqd)->queue, "%s " fmt, pid_str, ##args); \
1127 blk_add_trace_msg((bfqd)->queue, "bfq " fmt, ##args)