diff options
author | Jens Axboe <axboe@kernel.dk> | 2017-08-28 15:00:44 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-08-28 15:00:44 -0400 |
commit | cd996fb47c360320cf25ac9503c16de085ea9cfc (patch) | |
tree | 38a4730b2c031afe7daf632064f9687f1e09194e /block/bfq-iosched.h | |
parent | e9a823fb34a8b0fcba6e112aa1003258a1a5af50 (diff) | |
parent | cc4a41fe5541a73019a864883297bd5043aa6d98 (diff) |
Merge tag 'v4.13-rc7' into for-4.14/block-postmerge
Linux 4.13-rc7
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bfq-iosched.h')
-rw-r--r-- | block/bfq-iosched.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h index fb28c255bcab..cc4ea8574483 100644 --- a/block/bfq-iosched.h +++ b/block/bfq-iosched.h | |||
@@ -71,17 +71,29 @@ struct bfq_service_tree { | |||
71 | * | 71 | * |
72 | * bfq_sched_data is the basic scheduler queue. It supports three | 72 | * bfq_sched_data is the basic scheduler queue. It supports three |
73 | * ioprio_classes, and can be used either as a toplevel queue or as an | 73 | * ioprio_classes, and can be used either as a toplevel queue or as an |
74 | * intermediate queue on a hierarchical setup. @next_in_service | 74 | * intermediate queue in a hierarchical setup. |
75 | * points to the active entity of the sched_data service trees that | ||
76 | * will be scheduled next. It is used to reduce the number of steps | ||
77 | * needed for each hierarchical-schedule update. | ||
78 | * | 75 | * |
79 | * The supported ioprio_classes are the same as in CFQ, in descending | 76 | * The supported ioprio_classes are the same as in CFQ, in descending |
80 | * priority order, IOPRIO_CLASS_RT, IOPRIO_CLASS_BE, IOPRIO_CLASS_IDLE. | 77 | * priority order, IOPRIO_CLASS_RT, IOPRIO_CLASS_BE, IOPRIO_CLASS_IDLE. |
81 | * Requests from higher priority queues are served before all the | 78 | * Requests from higher priority queues are served before all the |
82 | * requests from lower priority queues; among requests of the same | 79 | * requests from lower priority queues; among requests of the same |
83 | * queue requests are served according to B-WF2Q+. | 80 | * queue requests are served according to B-WF2Q+. |
84 | * All the fields are protected by the queue lock of the containing bfqd. | 81 | * |
82 | * The schedule is implemented by the service trees, plus the field | ||
83 | * @next_in_service, which points to the entity on the active trees | ||
84 | * that will be served next, if 1) no changes in the schedule occurs | ||
85 | * before the current in-service entity is expired, 2) the in-service | ||
86 | * queue becomes idle when it expires, and 3) if the entity pointed by | ||
87 | * in_service_entity is not a queue, then the in-service child entity | ||
88 | * of the entity pointed by in_service_entity becomes idle on | ||
89 | * expiration. This peculiar definition allows for the following | ||
90 | * optimization, not yet exploited: while a given entity is still in | ||
91 | * service, we already know which is the best candidate for next | ||
92 | * service among the other active entitities in the same parent | ||
93 | * entity. We can then quickly compare the timestamps of the | ||
94 | * in-service entity with those of such best candidate. | ||
95 | * | ||
96 | * All fields are protected by the lock of the containing bfqd. | ||
85 | */ | 97 | */ |
86 | struct bfq_sched_data { | 98 | struct bfq_sched_data { |
87 | /* entity in service */ | 99 | /* entity in service */ |