函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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* ^ ^ ^* | | |* |<->|<----------------->|<--->|*

函数原型:static __always_inline unsigned int accumulate_sum(u64 delta, struct sched_avg *sa, unsigned long load, unsigned long runnable, int running)

返回类型:unsigned int

参数:

类型参数名称
u64delta
struct sched_avg *sa
unsigned longload
unsigned longrunnable
intrunning
113  contrib等于delta
116  delta加等于period_contrib
117  periods等于delta除1024
122  如果periods
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  如果loadload_sum加等于loadcontrib
139  如果runnablerunnable_load_sum加等于runnablecontrib
141  如果runningutil_sum加等于contrib左移Increase resolution of cpu_capacity calculations
144  返回:periods
调用者
名称描述
___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