Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:throtl_downgrade_check

Proto:static void throtl_downgrade_check(struct throtl_grp *tg)

Type:void

Parameter:

TypeParameterName
struct throtl_grp *tg
2009  now = jiffies
2011  If limit_index != LIMIT_MAX || Not limit_valid[LIMIT_LOW] Then Return
2014  If Not list_empty - tests whether a list is empty*@head: the list to test. Then Return
2016  If These inlines deal with timer wrapping correctly. You are * strongly encouraged to use them* 1. Because people otherwise forget* 2. Because if the timer wrap changes in future you won't have to* alter your driver code.(last_check_time + throtl_slice, now) Then Return
2019  elapsed_time = now - last_check_time
2020  last_check_time = now
2022  If time_before(now, g should not be an intermediate node + throtl_slice) Then Return
2026  If internally used bytes per second rate limits [generic data direction definitions ][LIMIT_LOW] Then
2027  bps = last_bytes_disp[generic data direction definitions ] * HZ
2028  do_div() is NOT a C function(bps, elapsed_time)
2029  If bps >= internally used bytes per second rate limits [generic data direction definitions ][LIMIT_LOW] Then last_low_overflow_time[generic data direction definitions ] = now
2033  If internally used bytes per second rate limits [WRITE][LIMIT_LOW] Then
2034  bps = last_bytes_disp[WRITE] * HZ
2035  do_div() is NOT a C function(bps, elapsed_time)
2036  If bps >= internally used bytes per second rate limits [WRITE][LIMIT_LOW] Then last_low_overflow_time[WRITE] = now
2040  If internally used IOPS limits [generic data direction definitions ][LIMIT_LOW] Then
2041  iops = last_io_disp[generic data direction definitions ] * HZ / elapsed_time
2042  If iops >= internally used IOPS limits [generic data direction definitions ][LIMIT_LOW] Then last_low_overflow_time[generic data direction definitions ] = now
2046  If internally used IOPS limits [WRITE][LIMIT_LOW] Then
2047  iops = last_io_disp[WRITE] * HZ / elapsed_time
2048  If iops >= internally used IOPS limits [WRITE][LIMIT_LOW] Then last_low_overflow_time[WRITE] = now
2056  If throtl_hierarchy_can_downgrade(tg) Then throtl_downgrade_state( throtl_data this group belongs to , LIMIT_LOW)
2059  last_bytes_disp[generic data direction definitions ] = 0
2060  last_bytes_disp[WRITE] = 0
2061  last_io_disp[generic data direction definitions ] = 0
2062  last_io_disp[WRITE] = 0
Caller
NameDescribe
blk_throtl_bio