函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Return true if the process associated with bfqq is "slow". The slow* flag is used, in addition to the budget timeout, to reduce the* amount of service provided to seeky processes, and thus reduce* their chances to lower the throughput

函数原型:static bool bfq_bfqq_is_slow(struct bfq_data *bfqd, struct bfq_queue *bfqq, bool compensate, enum bfqq_expiration reason, unsigned long *delta_ms)

返回类型:bool

参数:

类型参数名称
struct bfq_data *bfqd
struct bfq_queue *bfqq
boolcompensate
enum bfqq_expirationreason
unsigned long *delta_ms
3729  slow等于BFQQ_SEEKY(bfqq)
3731  如果非bfq_bfqq_sync(bfqq)则返回:false
3734  如果compensatedelta_ktime等于 beginning of the last idle slice
3736  否则delta_ktime等于ktime_get()
3738  delta_ktime等于Subtract two ktime_t variables. rem = lhs -rhs: (delta_ktime, beginning of the last budget )
3739  delta_usecs等于ktime_to_us(delta_ktime)
3742  如果delta_usecs小于1000则
3743  如果blk_queue_nonrot( device request queue )则delta_ms等于Below this threshold (in ns), we consider thinktime immediate. NSEC_PER_MSEC
3749  否则delta_ms等于Idling period duration, in ns. NSEC_PER_MSEC
3752  返回:slow
3755  delta_ms等于delta_usecsUSEC_PER_MSEC
3761  如果delta_usecs大于20000则
3772  slow等于 amount of service received during the last service slot 小于 maximum budget allotted to a bfq_queue before rescheduling 除2
3775  bfq_log_bfqq(bfqd, bfqq, "bfq_bfqq_is_slow: slow %d", slow)
3777  返回:slow
调用者
名称描述
bfq_bfqq_expireq_bfqq_expire - expire a queue.*@bfqd: device owning the queue.*@bfqq: the queue to expire.*@compensate: if true, compensate for the time spent idling.*@reason: the reason causing the expiration.* If the process associated with bfqq does slow I/O (e