Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Accumulate 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* ^ ^ ^* | | |* |<->|<----------------->|<--->|*

Proto:static __always_inline unsigned int accumulate_sum(u64 delta, struct sched_avg *sa, unsigned long load, unsigned long runnable, int running)

Type:unsigned int

Parameter:

TypeParameterName
u64delta
struct sched_avg *sa
unsigned longload
unsigned longrunnable
intrunning
113  contrib = delta
116  delta += period_contrib
117  periods = delta / 1024
122  If periods Then
123  load_sum = Approximate:* val * y^n, where y^32 ~= 0.5 (~1 scheduling period)
124  runnable_load_sum = Approximate:* val * y^n, where y^32 ~= 0.5 (~1 scheduling period)
126  util_sum = Approximate:* val * y^n, where y^32 ~= 0.5 (~1 scheduling period)
131  delta %= 1024
132  contrib = __accumulate_pelt_segments(periods, 1024 - period_contrib, delta)
135  period_contrib = delta
137  If load Then load_sum += load * contrib
139  If runnable Then runnable_load_sum += runnable * contrib
141  If running Then util_sum += contrib << Increase resolution of cpu_capacity calculations
144  Return periods
Caller
NameDescribe
___update_load_sumWe can represent the historical contribution to runnable average as the* coefficients of a geometric series. To do this we sub-divide our runnable* history into segments of approximately 1ms (1024us); label the segment that