Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:update_averages

Proto:static u64 update_averages(struct psi_group *group, u64 now)

Type:u64

Parameter:

TypeParameterName
struct psi_group *group
u64now
359  missed_periods = 0
365  expires = avg_next_update
366  If now - expires >= Sampling frequency in nanoseconds Then 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 = now - avg_last_update + missed_periods * Sampling frequency in nanoseconds
378  avg_last_update = now
380  When s < NR_PSI_STATES - 1 cycle
383  sample = total[PSI_AVGS][s] - avg_total[s]
401  If sample > period Then sample = period
403  avg_total[s] += sample
404  calc_avgs(avg[s], missed_periods, sample, period)
407  Return avg_next_update
Caller
NameDescribe
psi_avgs_work
psi_show