Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\kyber-iosched.c Create Date:2022-07-28 17:52:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kyber_init_hctx

Proto:static int kyber_init_hctx(struct blk_mq_hw_ctx *hctx, unsigned int hctx_idx)

Type:int

Parameter:

TypeParameterName
struct blk_mq_hw_ctx *hctx
unsigned inthctx_idx
463  kqd = elevator_data
467  khd = kmalloc_node( size of khd , GFP_KERNEL, @numa_node: NUMA node the storage adapter has been connected to. )
468  If Not khd Then Return -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  If Not kcqs Then Go to err_khd
477  When i < @nr_ctx: Number of software queues. cycle kyber_ctx_queue_init( & kcqs[i])
480  When i < KYBER_NUM_DOMAINS cycle
483  When --i >= 0 cycle
485  Go to err_kcqs
489  Process spin lock initialization( & lock)
491  When i < KYBER_NUM_DOMAINS cycle
492  Initialization list head
493  if set, sbq_wait is accounted = NULL
494  init_waitqueue_func_entry( & wait, kyber_domain_wake)
496  private = hctx
497  Initialization list head
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  Return 0
510  err_kcqs :
511  kfree(kcqs)
512  err_khd :
513  kfree(khd)
514  Return -ENOMEM