函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kyber_queue_data_alloc

函数原型:static struct kyber_queue_data *kyber_queue_data_alloc(struct request_queue *q)

返回类型:struct kyber_queue_data

参数:

类型参数名称
struct request_queue *q
369  ret等于负ENOMEM
372  kqd等于根据内存节点分配内存
373  如果非kqd则转到:err
376  q等于q
378  cpu_latency等于alloc_percpu_gfp(structkyber_cpu_latency, GFP_KERNEL | __GFP_ZERO)
380  如果非cpu_latency则转到:err_kqd
383  imer_setup - prepare a timer for first use*@timer: the timer in question*@callback: the function to call when timer expires*@flags: any TIMER_* flags* Regular timer initialization should use either DEFINE_TIMER() above,* or timer_setup()( & Timer for stats aggregation and adjusting domain tokens. , kyber_timer_fn, 0)
385 i小于KYBER_NUM_DOMAINS循环
386  WARN_ON(!Maximum device-wide depth for each scheduling domain.* Even for fast devices with lots of tags like NVMe, you can saturate the* device with only a fraction of the maximum possible queue depth. So, we cap* these to a reasonable value.[i])
387  WARN_ON(!Batch size (number of requests we'll dispatch in a row) for each scheduling* domain.[i])
388  ret等于sbitmap_queue_init_node( & * Each scheduling domain has a limited number of in-flight requests * device-wide, limited by these tokens.[i], Maximum device-wide depth for each scheduling domain.* Even for fast devices with lots of tags like NVMe, you can saturate the* device with only a fraction of the maximum possible queue depth. So, we cap* these to a reasonable value.[i], - 1, TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., GFP_KERNEL, node)
391  如果ret
392 i先自减大于等于0循环
394  转到:err_buckets
398 i小于KYBER_OTHER循环
399  domain_p99[i]等于负1
400  Target latencies in nanoseconds. [i]等于Default latency targets for each scheduling domain.[i]
403  shift等于kyber_sched_tags_shift(q)
404  * Async request percentage, converted to per-word depth for * sbitmap_get_shallow().等于1U左移shift位的值乘KYBER_ASYNC_PERCENT除100U
406  返回:kqd
408  err_buckets :
409  释放内存
410  err_kqd :
411  释放内存
412  err :
413  返回:错误号
调用者
名称描述
kyber_init_sched