函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Approximate:* val * y^n, where y^32 ~= 0.5 (~1 scheduling period)

函数原型:static u64 decay_load(u64 val, u64 n)

返回类型:u64

参数:

类型参数名称
u64val
u64n
41  如果此条件成立可能性小(为编译器优化)(n > LOAD_AVG_PERIOD * 63)则返回:0
45  local_n等于n
54  如果此条件成立可能性小(为编译器优化)(local_n >= LOAD_AVG_PERIOD)则
55  val右移等于local_nLOAD_AVG_PERIOD
56  local_n取模等于LOAD_AVG_PERIOD
59  val等于mul_u64_u32_shr(val, runnable_avg_yN_inv[local_n], 32)
60  返回:val
调用者
名称描述
__accumulate_pelt_segments
accumulate_sumAccumulate the three separate parts of the sum; d1 the remainder* of the last (incomplete) period, d2 the span of full periods and d3* the remainder of the (incomplete) current period.* d1 d2 d3* ^ ^ ^* | | |* |<->|<----------------->|<--->|*