Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kyber_queue_data_alloc

Proto:static struct kyber_queue_data *kyber_queue_data_alloc(struct request_queue *q)

Type:struct kyber_queue_data

Parameter:

TypeParameterName
struct request_queue *q
369  ret = -ENOMEM
372  kqd = kzalloc_node - allocate zeroed memory from a particular memory node.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).*@node: memory node from which to allocate
373  If Not kqd Then Go to err
376  q = q
378  cpu_latency = alloc_percpu_gfp(structkyber_cpu_latency, GFP_KERNEL | __GFP_ZERO)
380  If Not cpu_latency Then Go to 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  When i < KYBER_NUM_DOMAINS cycle
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  If ret Then
392  When --i >= 0 cycle
394  Go to err_buckets
398  When i < KYBER_OTHER cycle
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  Return kqd
408  err_buckets :
409  free previously allocated percpu memory
410  err_kqd :
411  kfree(kqd)
412  err :
413  Return ERR_PTR(ret)
Caller
NameDescribe
kyber_init_sched