Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\bfq-iosched.c Create Date:2022-07-28 17:57:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bfq_completed_request

Proto:static void bfq_completed_request(struct bfq_queue *bfqq, struct bfq_data *bfqd)

Type:void

Parameter:

TypeParameterName
struct bfq_queue *bfqq
struct bfq_data *bfqd
5607  bfq_update_hw_tag(bfqd)
5609  number of requests dispatched and waiting for completion --
5610  umber of requests on the dispatch list or inside driver --
5612  If Not umber of requests on the dispatch list or inside driver && Not bfq_bfqq_busy(bfqq) Then
5619  udget expiration (in jiffies) = jiffies
5621  Invoke __bfq_weights_tree_remove on bfqq and decrement the number* of active groups for each queue's inactive parent entity.
5624  now_ns = ktime_get_ns()
5626  completion time of the last request = now_ns
5632  delta_us = div_u64 - unsigned 64bit divide with 32bit divisor*@dividend: unsigned 64bit dividend*@divisor: unsigned 32bit divisor* This is the most common 64bit divide and should be used if possible,* as many 32bit archs can optimize this variant better than a full
5650  If delta_us > Below this threshold (in ns), we consider thinktime immediate. / NSEC_PER_USEC && ( max rq size seen during current observation interval (sectors) << Shift used for peak-rate fixed precision calculations) / delta_us < 1UL << Shift used for peak-rate fixed precision calculations - 10 Then bfq_update_rate_reset(bfqd, NULL)
5654  time of last request completion (ns) = now_ns
5655  bfqq owning the last completed rq = bfqq
5668  If bfq_bfqq_softrt_update(bfqq) && umber of requests on the dispatch list or inside driver == 0 && RB_EMPTY_ROOT( & sorted list of pending requests ) && actor by which the weight of this queue is multiplied != * Maximum factor by which the weight of a weight-raised queue * is multiplied. Then Minimum time instant such that, only if a new request is* enqueued after this time instant in an idle @bfq_queue with* no outstanding requests, then the task associated with the* queue it is deemed as soft real-time (see the comments on* the function = To be deemed as soft real-time, an application must meet two* requirements
5678  If bfq_queue in service == bfqq Then
5705  Return
5706  Else if If we expire a queue that is actively waiting (i.e., with the* device idled) for the arrival of a new request, then we may incur* the timestamp misalignment problem described in the body of the* function __bfq_activate_entity Then q_bfqq_expire - expire a queue.*@bfqd: device owning the queue.*@bfqq: the queue to expire.*@compensate: if true, compensate for the time spent idling.*@reason: the reason causing the expiration.* If the process associated with bfqq does slow I/O (e
5709  Else if RB_EMPTY_ROOT( & sorted list of pending requests ) && ( umber of requests on the dispatch list or inside driver == 0 || Not For a queue that becomes empty, device idling is allowed only if* this function returns true for that queue ) Then q_bfqq_expire - expire a queue.*@bfqd: device owning the queue.*@bfqq: the queue to expire.*@compensate: if true, compensate for the time spent idling.*@reason: the reason causing the expiration.* If the process associated with bfqq does slow I/O (e
5716  If Not number of requests dispatched and waiting for completion Then Scheduler run of queue, if there are requests pending and no one in the* driver that will restart queueing.
Caller
NameDescribe
bfq_finish_requeue_requestHandle either a requeue or a finish for rq. The things to do are* the same in both cases: all references to rq are to be dropped. In* particular, rq is considered completed from the point of view of* the scheduler.