Function report |
Source Code:block\blk-mq.c |
Create Date:2022-07-28 17:11:03 |
Last Modify:2020-03-17 23:18:05 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:blk_mq_alloc_hctx
Proto:static struct blk_mq_hw_ctx *blk_mq_alloc_hctx(struct request_queue *q, struct blk_mq_tag_set *set, int node)
Type:struct blk_mq_hw_ctx
Parameter:
Type | Parameter | Name |
---|---|---|
struct request_queue * | q | |
struct blk_mq_tag_set * | set | |
int | node |
2313 | If Not hctx Then Go to fail_alloc_hctx |
2316 | If Not zalloc_cpumask_var_node( & @cpumask: Map of available CPUs where this hctx can run. , gfp, node) Then Go to free_hctx |
2319 | atomic_set( & @nr_active: Number of active requests. Only used when a tag set is* shared across request queues., 0) |
2320 | If node == NUMA_NO_NODE Then node = numa_node |
2324 | INIT_DELAYED_WORK( & @run_work: Used for scheduling a hardware queue run at a later time., blk_mq_run_work_fn) |
2336 | @ctxs: Array of software queues. = kmalloc_array_node(Setup number of possible processor ids , size of * , gfp, node) |
2338 | If Not @ctxs: Array of software queues. Then Go to free_cpumask |
2344 | @nr_ctx: Number of software queues. = 0 |
2347 | init_waitqueue_func_entry( & @dispatch_wait: Waitqueue to put requests when there is no tag* available at the moment, to wait for another try in the future., blk_mq_dispatch_wake) |
2350 | @fq: Queue of requests that need to perform a flush operation. = blk_alloc_flush_queue(q, @numa_node: NUMA node the storage adapter has been connected to. , cmd_size, gfp) |
2352 | If Not @fq: Queue of requests that need to perform a flush operation. Then Go to free_bitmap |
2357 | blk_mq_hctx_kobj_init(hctx) |
2359 | Return hctx |
2361 | free_bitmap : |
2363 | free_ctxs : |
2365 | free_cpumask : |
2367 | free_hctx : |
2369 | fail_alloc_hctx : |
2370 | Return NULL |
Name | Describe |
---|---|
blk_mq_alloc_and_init_hctx |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |