函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:update_averages

函数原型:static u64 update_averages(struct psi_group *group, u64 now)

返回类型:u64

参数:

类型参数名称
struct psi_group *group
u64now
359  missed_periods等于0
365  expires等于avg_next_update
366  如果nowexpires大于等于Sampling frequency in nanoseconds missed_periods等于div_u64 - unsigned 64bit divide with 32bit divisor*@dividend: unsigned 64bit dividend*@divisor: unsigned 32bit divisor* This is the most common 64bit divide and should be used if possible,* as many 32bit archs can optimize this variant better than a full
376  avg_next_update等于expires加1加missed_periods的和乘Sampling frequency in nanoseconds
377  period等于nowavg_last_updatemissed_periodsSampling frequency in nanoseconds
378  avg_last_update等于now
380 s小于NR_PSI_STATES减1循环
383  sample等于total[PSI_AVGS][s]减avg_total[s]
401  如果sample大于periodsample等于period
403  avg_total[s]加等于sample
404  calc_avgs(avg[s], missed_periods, sample, period)
407  返回:avg_next_update
调用者
名称描述
psi_avgs_work
psi_show