函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kyber_init_hctx

函数原型:static int kyber_init_hctx(struct blk_mq_hw_ctx *hctx, unsigned int hctx_idx)

返回类型:int

参数:

类型参数名称
struct blk_mq_hw_ctx *hctx
unsigned inthctx_idx
463  kqd等于elevator_data
467  khd等于kmalloc_node(khd的长度, GFP_KERNEL, @numa_node: NUMA node the storage adapter has been connected to. )
468  如果非khd则返回:负ENOMEM
471  kcqs等于kmalloc_array_node(@nr_ctx: Number of software queues. , sizeof(structkyber_ctx_queue), GFP_KERNEL, @numa_node: NUMA node the storage adapter has been connected to. )
474  如果非kcqs则转到:err_khd
477 i小于@nr_ctx: Number of software queues. 循环kyber_ctx_queue_init( & kcqs[i])
480 i小于KYBER_NUM_DOMAINS循环
483 i先自减大于等于0循环
485  转到:err_kcqs
489  spin_lock_init( & lock)
491 i小于KYBER_NUM_DOMAINS循环
492  初始化链表头
493  if set, sbq_wait is accounted = NULL
494  init_waitqueue_func_entry( & wait, kyber_domain_wake)
496  private等于hctx
497  初始化链表头
498  atomic_set( & wait_index[i], 0)
501  cur_domain等于0
502  batching等于0
504  @sched_data: Pointer owned by the IO scheduler attached to a request* queue. It's up to the IO scheduler how to use this pointer.等于khd
505  sbitmap_queue_min_shallow_depth( & bitmap_tags, * Async request percentage, converted to per-word depth for * sbitmap_get_shallow().)
508  返回:0
510  err_kcqs :
511  释放内存
512  err_khd :
513  释放内存
514  返回:负ENOMEM