函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\bfq-iosched.c Create Date:2022-07-27 19:32:19
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Select a queue for service. If we have a current queue in service,* check whether to continue servicing it, or retrieve and set a new one.

函数原型:static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd)

返回类型:struct bfq_queue

参数:

类型参数名称
struct bfq_data *bfqd
4340  reason等于udget took too long to be used
4342  bfqq等于 bfq_queue in service
4343  如果非bfqq则转到:new_queue
4346  bfq_log_bfqq(bfqd, bfqq, "select_queue: already in-service queue")
4355  如果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且非If the in-service queue is empty but the function bfq_better_to_idle* returns true, then:* 1) the queue must remain in service and cannot be expired, and* 2) the device must be idled to wait for the possible arrival of a new* request for the queue则转到:expire
4359  check_queue :
4366  next_rq等于 fifo isn't expired, next request to serve
4371  如果next_rq
4380  reason等于udget consumed
4381  转到:expire
4382  否则
4388  如果bfq_bfqq_wait_request(bfqq)则
4405  转到:keep_queue
4417  如果bfq_bfqq_wait_request(bfqq)或umber of requests on the dispatch list or inside driver 不等于0且For a queue that becomes empty, device idling is allowed only if* this function returns true for that queue
4419  struct bfq_queue * async_bfqq = Pointer to the bfq_io_cq owning the bfq_queue, set to %NULL* if the queue is shared. && array of two process queues, the sync and the async [0] && bfq_bfqq_busy( array of two process queues, the sync and the async [0]) && fifo isn't expired, next request to serve ? array of two process queues, the sync and the async [0] : NULL
4497  如果async_bfqqq_to_bic - convert iocontext queue structure to bfq_io_cq.*@icq: the iocontext queue.恒等于Pointer to the bfq_io_cq owning the bfq_queue, set to %NULL* if the queue is shared.see the definition of bfq_async_charge_factor for details 小于等于bfq_bfqq_budget_left(async_bfqq)则bfqq等于 array of two process queues, the sync and the async [0]
4502  否则如果bfq_bfqq_has_waker(bfqq)且bfq_bfqq_busy(Pointer to the waker queue for this queue, i.e., to the* queue Q such that this queue happens to get new I/O right* after some I/O request of Q is completed. For details, see* the comments on the choice of the queue for injection in* bfq_select_queue().)且 fifo isn't expired, next request to serve see the definition of bfq_async_charge_factor for details 小于等于bfq_bfqq_budget_left(Pointer to the waker queue for this queue, i.e., to the* queue Q such that this queue happens to get new I/O right* after some I/O request of Q is completed. For details, see* the comments on the choice of the queue for injection in* bfq_select_queue().)则bfqq等于Pointer to the waker queue for this queue, i.e., to the* queue Q such that this queue happens to get new I/O right* after some I/O request of Q is completed. For details, see* the comments on the choice of the queue for injection in* bfq_select_queue().
4510  否则如果非idling_boosts_thr_without_issues(bfqd, bfqq)且actor by which the weight of this queue is multiplied 恒等于1或 number of weight-raised busy @bfq_queues 大于1或非bfq_bfqq_has_short_ttime(bfqq)的值则bfqq等于This function chooses the queue from which to pick the next extra* I/O request to inject, if it finds a compatible queue
4514  否则bfqq = NULL
4517  转到:keep_queue
4520  reason等于he queue has no more requests
4521  expire :
4522  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
4523  new_queue :
4524  bfqq等于Get and set a new queue for service.
4525  如果bfqq
4526  bfq_log_bfqq(bfqd, bfqq, "select_queue: checking new queue")
4527  转到:check_queue
4529  keep_queue :
4530  如果bfqqbfq_log_bfqq(bfqd, bfqq, "select_queue: returned this queue")
4532  否则bfq_log(bfqd, "select_queue: no queue returned")
4535  返回:bfqq
调用者
名称描述
__bfq_dispatch_request