函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:deadline_dispatch_requests selects the best request according to* read/write expire, fifo_batch, etc

函数原型:static struct request *__dd_dispatch_request(struct deadline_data *dd)

返回类型:struct request

参数:

类型参数名称
struct deadline_data *dd
277  如果非链表为空
278  rq等于list_first_entry - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.* Note, that list is expected to be not empty.( & dispatch, structrequest, queuelist)
279  删除链表项并重新初始化
280  转到:done
283  reads等于非链表为空
284  writes等于非链表为空
289  rq等于For the specified data direction, return the next request to* dispatch using sector position sorted lists.
290  如果非rqrq等于For the specified data direction, return the next request to* dispatch using sector position sorted lists.
293  如果rq number of sequential requests made 小于fifo_batch则转到:dispatch_request
302  如果reads
303  BUG_ON(RB_EMPTY_ROOT( & * requests (deadline_rq s) are present on both sort_list and fifo_list[generic data direction definitions ]))
305  如果For the specified data direction, return the next request to* dispatch using arrival ordered lists. times reads have starved writes 自加大于等于writes_starved则转到:dispatch_writes
309  data_dir等于generic data direction definitions
311  转到:dispatch_find_request
318  如果writes
319  dispatch_writes :
320  BUG_ON(RB_EMPTY_ROOT( & * requests (deadline_rq s) are present on both sort_list and fifo_list[WRITE]))
322  times reads have starved writes 等于0
324  data_dir等于WRITE
326  转到:dispatch_find_request
329  返回:NULL
331  dispatch_find_request :
335  next_rq等于For the specified data direction, return the next request to* dispatch using sector position sorted lists.
336  如果deadline_check_fifo returns 0 if there are no expired requests on the fifo,* 1 otherwise. Requires !list_empty(&dd->fifo_list[data_dir])或非next_rq
342  rq等于For the specified data direction, return the next request to* dispatch using arrival ordered lists.
343  否则
348  rq等于next_rq
355  如果非rq则返回:NULL
358  number of sequential requests made 等于0
360  dispatch_request :
364  number of sequential requests made 自加
365  move an entry to dispatch queue
366  done :
370  blk_req_zone_write_lock(rq)
371  rq_flags或等于drive already may have started this one
372  返回:rq
调用者
名称描述
dd_dispatch_requestOne confusing aspect here is that we get called for a specific* hardware queue, but we may return a request that is for a* different hardware queue. This is because mq-deadline has shared* state for all hardware queues, in terms of sorting, FIFOs, etc.