#include <trace/events/block.h>@@ -588,8 +589,10 @@ EXPORT_SYMBOL(blk_mq_abort_requeue_list);struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, unsigned int tag) { if (tag < tags->nr_tags) if (tag < tags->nr_tags) {prefetch(tags->rqs[tag]);...
make_request_fn:设置bio提交时的回调函数,一般设置为blk_mq_make_request; last_merge:指向队列中首次可能合并的请求描述符; elevator:指向elevator对象的指针(电梯算法),决定了I/O调度层使用的I/O调度算法; mq_ops:块设备驱动mq的操作集合,用于抽象块设备驱动的行为; requeue_list:请求队列中保存的request双向链...
新daemon关联到/dev/ublkb*后,这类请求会被重新下发一次,因此要求后端的分布式存储有处理重复写入的能力。在代码上,若开启该标记,monitor_work会blk_mq_requeue_request请求(此时是quiesced状态,不会发生->queue_rq),否则直接blk_mq_end_request。可以说,UBLK_F_USER_RECOVERY_REISSUE是从实际业务出发而设计的。
blk_update_request报错linux malloc()函数是C函数库封装的一个核心函数,对应的系统调用是brk()。1. brk实现要了解brk的实现首先需要知道进程用户空间的划分,以及struct mm_struct结构体中代码段、数据段、堆相关参数。然后brk也是基于VMA,找到合适的虚拟地址空间,创建新的VMA并插入VMA红黑树和链表中。首先看看mm_str...
@@ -238,7 +238,6 @@ void blk_sync_queue(struct request_queue *q) struct blk_mq_hw_ctx *hctx; int i;cancel_delayed_work_sync(&q->requeue_work); queue_for_each_hw_ctx(q, hctx, i)cancel_delayed_work_sync(&hctx->run_work); ...
no any queue activity after freeze, including run queue and requeue work. Thanks Jianchao On 4/4/19 4:43 PM, Ming Lei wrote: > Inside __blk_mq_update_nr_hw_queues(), only request queues are frozen > before updating nr_hw_queues. ...
分析: /**blk_plug permits building a queue of related requests by holding the I/O* fragments for a short period. This allows merging of sequential requests* into single larger request. As the requests are moved from a per-task list to* the device's request_queue in a batch, this resul...
+++ b/block/blk-mq.c @@ -2634,6 +2634,8 @@ void blk_mq_release(struct request_queue *q) struct blk_mq_hw_ctx *hctx; unsigned int i; + cancel_delayed_work_sync(&q->requeue_work); + /* hctx kobj stays in hctx */
blk_requeue_request(rq, req); wait:/* Avoid pointless unplugs. */blk_stop_queue(rq);break; } queued++; }if(queued !=0) flush_requests(info); } 开发者ID:kong123456,项目名称:tolapai,代码行数:47,代码来源:ixpfront.c 示例4: zvol_discard ...
blk_mq_freeze_queue_wait blk_mq_freeze_queue_wait_timeout blk_mq_init_queue blk_mq_init_sq_queue blk_mq_map_queues blk_mq_pci_map_queues blk_mq_quiesce_queue blk_mq_request_completed blk_mq_requeue_request blk_mq_rq_cpu blk_mq_run_hw_queues blk_mq_start_request ...