Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ioc_autop_idx

Proto:static int ioc_autop_idx(struct ioc *ioc)

Type:int

Parameter:

TypeParameterName
struct ioc *ioc
721  idx = autop_idx
722  p = autop[idx]
727  If Not blk_queue_nonrot(q) Then Return AUTOP_HDD
731  If blk_queue_depth(q) == 1 Then Return AUTOP_SSD_QD1
735  If idx < AUTOP_SSD_DFL Then Return AUTOP_SSD_DFL
739  If user_qos_params || user_cost_model Then Return idx
743  vrate_pct = div64_u64 - unsigned 64bit divide with 64bit divisor*@dividend: 64bit dividend*@divisor: 64bit divisor* This implementation is a modified version of the algorithm proposed* by the book 'Hacker's Delight'. The original source and full proof
745  now_ns = ktime_get_ns()
747  If too_fast_vrate_pct && too_fast_vrate_pct <= vrate_pct Then
748  If Not autop_too_fast_at Then autop_too_fast_at = now_ns
750  If now_ns - autop_too_fast_at >= AUTOP_CYCLE_NSEC Then Return idx + 1
752  Else
753  autop_too_fast_at = 0
756  If too_slow_vrate_pct && too_slow_vrate_pct >= vrate_pct Then
757  If Not autop_too_slow_at Then autop_too_slow_at = now_ns
759  If now_ns - autop_too_slow_at >= AUTOP_CYCLE_NSEC Then Return idx - 1
761  Else
762  autop_too_slow_at = 0
765  Return idx
Caller
NameDescribe
ioc_refresh_params