函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:throtl_pd_alloc

函数原型:static struct blkg_policy_data *throtl_pd_alloc(gfp_t gfp, struct request_queue *q, struct blkcg *blkcg)

返回类型:struct blkg_policy_data

参数:

类型参数名称
gfp_tgfp
struct request_queue *q
struct blkcg *blkcg
492  tg等于根据内存节点分配内存
493  如果非tg则返回:NULL
496  如果blkg_rwstat_init( & stat_bytes, gfp)则转到:err_free_tg
499  如果blkg_rwstat_init( & stat_ios, gfp)则转到:err_exit_stat_bytes
502  a service_queue, assumes the caller zeroed it
504 rw小于等于WRITE循环
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  返回: must be the first member
527  err_exit_stat_bytes :
528  blkg_rwstat_exit( & stat_bytes)
529  err_free_tg :
530  释放内存
531  返回:NULL