Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Returns 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

Proto:static bool tg_may_dispatch(struct throtl_grp *tg, struct bio *bio, unsigned long *wait)

Type:bool

Parameter:

TypeParameterName
struct throtl_grp *tg
struct bio *bio
unsigned long *wait
988  rw = Return the data direction, READ or WRITE.(bio)
989  bps_wait = 0 , iops_wait = 0 , max_wait = 0
997  BUG_ON( number of queued bios [rw] && bio != hrotl_peek_queued - peek the first bio on a qnode list*@queued: the qnode list to peek)
1001  If tg_bps_limit(tg, rw) == U64_MAX && tg_iops_limit(tg, rw) == UINT_MAX Then
1003  If wait Then wait = 0
1005  Return true
1015  If Determine if previously allocated or extended slice is complete or not && Not number of queued bios [rw] Then throtl_start_new_slice(tg, rw)
1017  Else
1018  If time_before(slice_end[rw], jiffies + throtl_slice) Then throtl_extend_slice(tg, rw, jiffies + throtl_slice)
1024  If tg_with_in_bps_limit(tg, bio, & bps_wait) && tg_with_in_iops_limit(tg, bio, & iops_wait) Then
1026  If wait Then wait = 0
1028  Return true
1031  max_wait = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(bps_wait, iops_wait)
1033  If wait Then wait = max_wait
1036  If time_before(slice_end[rw], jiffies + max_wait) Then throtl_extend_slice(tg, rw, jiffies + max_wait)
1039  Return false
Caller
NameDescribe
tg_update_disptime
throtl_dispatch_tg
blk_throtl_bio