Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:throtl_pd_alloc

Proto:static struct blkg_policy_data *throtl_pd_alloc(gfp_t gfp, struct request_queue *q, struct blkcg *blkcg)

Type:struct blkg_policy_data

Parameter:

TypeParameterName
gfp_tgfp
struct request_queue *q
struct blkcg *blkcg
492  tg = 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
493  If Not tg Then Return NULL
496  If blkg_rwstat_init( & stat_bytes, gfp) Then Go to err_free_tg
499  If blkg_rwstat_init( & stat_ios, gfp) Then Go to err_exit_stat_bytes
502  a service_queue, assumes the caller zeroed it
504  When rw <= WRITE cycle
505  throtl_qnode_init( & * qnode_on_self is used when bios are directly queued to this * throtl_grp so that local bios compete fairly with bios * dispatched from children. qnode_on_parent is used when bios are * dispatched from this throtl_grp into its parent and will compete * wi[rw], tg)
506  throtl_qnode_init( & qnode_on_parent[rw], tg)
509  RB_CLEAR_NODE( & active throtl group service_queue member )
510  internally used bytes per second rate limits [generic data direction definitions ][LIMIT_MAX] = U64_MAX
511  internally used bytes per second rate limits [WRITE][LIMIT_MAX] = U64_MAX
512  internally used IOPS limits [generic data direction definitions ][LIMIT_MAX] = UINT_MAX
513  internally used IOPS limits [WRITE][LIMIT_MAX] = UINT_MAX
514  user configured bps limits [generic data direction definitions ][LIMIT_MAX] = U64_MAX
515  user configured bps limits [WRITE][LIMIT_MAX] = U64_MAX
516  user configured IOPS limits [generic data direction definitions ][LIMIT_MAX] = UINT_MAX
517  user configured IOPS limits [WRITE][LIMIT_MAX] = UINT_MAX
520  us = DFL_LATENCY_TARGET
521  us = DFL_LATENCY_TARGET
522  us = DFL_IDLE_THRESHOLD
523  us = DFL_IDLE_THRESHOLD
525  Return must be the first member
527  err_exit_stat_bytes :
528  blkg_rwstat_exit( & stat_bytes)
529  err_free_tg :
530  kfree(tg)
531  Return NULL