函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:tg_service_queue_add

函数原型:static void tg_service_queue_add(struct throtl_grp *tg)

返回类型:void

参数:

类型参数名称
struct throtl_grp *tg
671  parent_sq等于 the parent service_queue
672  node等于rb_node
673  struct rb_node * parent = NULL
675  key等于* Dispatch time in jiffies. This is the estimated time when group * will unthrottle and is ready to dispatch more bio. It is used as * key to sort active groups in service tree.
676  bool leftmost = true
678  当( * node != NULL)循环
679  parent等于node
680  __tg等于rb_entry_tg(parent)
682  如果time_before(key, * Dispatch time in jiffies. This is the estimated time when group * will unthrottle and is ready to dispatch more bio. It is used as * key to sort active groups in service tree.)则node等于rb_left
684  否则
685  node等于rb_right
686  leftmost = false
690  rb_link_node( & active throtl group service_queue member , parent, node)
691  rb_insert_color_cached( & active throtl group service_queue member , & RB tree of active tgs , leftmost)
调用者
名称描述
__throtl_enqueue_tg