函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:tg_with_in_iops_limit

函数原型:static bool tg_with_in_iops_limit(struct throtl_grp *tg, struct bio *bio, unsigned long *wait)

返回类型:bool

参数:

类型参数名称
struct throtl_grp *tg
struct bio *bio
unsigned long *wait
899  rw等于Return the data direction, READ or WRITE.(bio)
904  jiffy_elapsed等于jiffies When did we start a new slice [rw]
907  jiffy_elapsed_rnd等于undup - round up to the next specified multiple*@x: the value to up*@y: multiple to round up to* Rounds @x up to next multiple of @y. If @y will always be a power* of 2, consider using the faster round_up().(jiffy_elapsed + 1, throtl_slice)
916  tmp等于tg_iops_limit(tg, rw)乘jiffy_elapsed_rnd
917  do_div() is NOT a C function(tmp, HZ)
919  如果tmp大于UINT_MAXio_allowed等于UINT_MAX
921  否则io_allowed等于tmp
924  如果 Number of bio's dispatched in current slice [rw]加1小于等于io_allowed
925  如果waitwait等于0
927  返回:true
931  jiffy_wait等于jiffy_elapsed_rndjiffy_elapsed
933  如果waitwait等于jiffy_wait
935  返回:false
调用者
名称描述
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