函数逻辑报告 |
Source Code:block\blk-mq.c |
Create Date:2022-07-27 18:45:04 |
Last Modify:2020-03-17 23:18:05 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Returns true if we did some work AND can potentially do more.
函数原型:bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list, bool got_budget)
返回类型:bool
参数:
类型 | 参数 | 名称 |
---|---|---|
struct request_queue * | q | |
struct list_head * | list | |
bool | got_budget |
1181 | bool no_tag = false |
1183 | ret等于BLK_STS_OK |
1185 | 如果链表为空则返回:false |
1188 | WARN_ON(!链表只有一项 && got_budget) |
1194 | 循环 |
1200 | 如果非got_budget且非blk_mq_get_dispatch_budget(hctx)则退出 |
1203 | 如果非blk_mq_get_driver_tag(rq)则 |
1217 | 如果@flags: BLK_MQ_F_* flags. Defines the behaviour of the queue. 按位与BLK_MQ_F_TAG_SHARED则no_tag = true |
1219 | 退出 |
1223 | 删除链表项并重新初始化 |
1233 | 否则 |
1235 | last等于非blk_mq_get_driver_tag(nxt) |
1245 | 如果非链表为空则 |
1247 | blk_mq_put_driver_tag(nxt) |
1249 | 添加链表项 |
1250 | __blk_mq_requeue_request(rq) |
1251 | 退出 |
1254 | 如果此条件成立可能性小(为编译器优化)(ret != BLK_STS_OK)则 |
1260 | queued自加 |
1269 | 如果非链表为空则 |
1277 | 如果commit_rqs则commit_rqs(hctx) |
1280 | 加自旋锁 |
1281 | 加入二个链表项并重新初始化 |
1282 | 自旋锁解锁 |
1309 | 如果非needs_restart或no_tag且链表为空且不修改则blk_mq_run_hw_queue(hctx, true) |
1312 | 否则如果needs_restart且ret恒等于BLK_STS_RESOURCE则blk_mq_delay_run_hw_queue(hctx, ms units ) |
1316 | 返回:false |
名称 | 描述 |
---|---|
blk_mq_do_dispatch_sched | Only SCSI implements .get_budget and .put_budget, and SCSI restarts* its queue by itself in its completion handler, so we don't need to* restart queue if .get_budget() returns BLK_STS_NO_RESOURCE. |
blk_mq_do_dispatch_ctx | Only SCSI implements .get_budget and .put_budget, and SCSI restarts* its queue by itself in its completion handler, so we don't need to* restart queue if .get_budget() returns BLK_STS_NO_RESOURCE. |
blk_mq_sched_dispatch_requests |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |