Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:tg_iops_limit

Proto:static unsigned int tg_iops_limit(struct throtl_grp *tg, int rw)

Type:unsigned int

Parameter:

TypeParameterName
struct throtl_grp *tg
intrw
328  blkg = tg_to_blkg(tg)
332  If cgroup_subsys_on_dfl - fast test on whether a subsys is on default hierarchy*@ss: subsystem in question(io_cgrp_subsys) && Not all non-root blkcg_gq's are guaranteed to have access to parent Then Return UINT_MAX
335  td = throtl_data this group belongs to
336  ret = internally used IOPS limits [rw][limit_index]
337  If ret == 0 && limit_index == LIMIT_LOW Then
339  If Not list_empty - tests whether a list is empty*@head: the list to test. || internally used bytes per second rate limits [rw][limit_index] Then Return UINT_MAX
342  Else Return MIN_THROTL_IOPS
346  If 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] Then
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  If adjusted > UINT_MAX Then adjusted = 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  Return ret
Caller
NameDescribe
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