Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\pelt.c Create Date:2022-07-28 09:43:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Approximate:* val * y^n, where y^32 ~= 0.5 (~1 scheduling period)

Proto:static u64 decay_load(u64 val, u64 n)

Type:u64

Parameter:

TypeParameterName
u64val
u64n
41  If Value for the false possibility is greater at compile time(n > LOAD_AVG_PERIOD * 63) Then Return 0
45  local_n = n
54  If Value for the false possibility is greater at compile time(local_n >= LOAD_AVG_PERIOD) Then
55  val >>= local_n / LOAD_AVG_PERIOD
56  local_n %= LOAD_AVG_PERIOD
59  val = mul_u64_u32_shr(val, runnable_avg_yN_inv[local_n], 32)
60  Return val
Caller
NameDescribe
__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* ^ ^ ^* | | |* |<->|<----------------->|<--->|*