函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:tg_iops_limit

函数原型:static unsigned int tg_iops_limit(struct throtl_grp *tg, int rw)

返回类型:unsigned int

参数:

类型参数名称
struct throtl_grp *tg
intrw
328  blkg等于tg_to_blkg(tg)
332  如果cgroup_subsys_on_dfl - fast test on whether a subsys is on default hierarchy*@ss: subsystem in question(io_cgrp_subsys)且非 all non-root blkcg_gq's are guaranteed to have access to parent 则返回:UINT_MAX
335  td等于 throtl_data this group belongs to
336  ret等于 internally used IOPS limits [rw][limit_index]
337  如果ret恒等于0且limit_index恒等于LIMIT_LOW
339  如果非链表为空 internally used bytes per second rate limits [rw][limit_index]则返回:UINT_MAX
342  否则返回:MIN_THROTL_IOPS
346  如果limit_index恒等于LIMIT_MAX internally used IOPS limits [rw][LIMIT_LOW]且 internally used IOPS limits [rw][LIMIT_LOW]不等于 internally used IOPS limits [rw][LIMIT_MAX]则
350  adjusted等于group's limit in LIMIT_MAX is scaled if low limit is set. This scale is to* make the IO dispatch more smooth.* Scale up: linearly scale up according to lapsed time since upgrade. For* every throtl_slice, the limit scales up 1/2 .low limit till the
351  如果adjusted大于UINT_MAXadjusted等于UINT_MAX
353  ret等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(unsignedint, internally used IOPS limits [rw][LIMIT_MAX], adjusted)
355  返回:ret
调用者
名称描述
tg_update_has_rulesSet has_rules[] if @tg or any of its parents have limits configured.* This doesn't require walking up to the top of the hierarchy as the* parent's has_rules[] is guaranteed to be correct.
throtl_trim_sliceTrim the used slices and adjust slice start accordingly
tg_with_in_iops_limit
tg_may_dispatchReturns whether one can dispatch a bio or not. Also returns approx number* of jiffies to wait before this bio is with-in IO rate and can be dispatched
tg_conf_updated
blk_throtl_bio