Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:psi_show

Proto:int psi_show(struct seq_file *m, struct psi_group *group, enum psi_res res)

Type:int

Parameter:

TypeParameterName
struct seq_file *m
struct psi_group *group
enum psi_resres
945  If static_branch_likely( & psi_disabled) Then Return -EOPNOTSUPP
949  mutex_lock( & avgs_lock)
950  now = Scheduler clock - returns current time in nanosec units.* This is default implementation.* Architectures and sub-architectures can override this.
951  collect_percpu_times(group, PSI_AVGS, NULL)
952  If now >= avg_next_update Then avg_next_update = update_averages(group, now)
954  mutex_unlock( & avgs_lock)
956  When full < 2 - (res == PSI_CPU) cycle
961  When w < 3 cycle avg[w] = avg[res * 2 + full][w]
963  total = 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
966  seq_printf(m, "%s avg10=%lu.%02lu avg60=%lu.%02lu avg300=%lu.%02lu total=%llu\n", full ? "full" : "some", LOAD_INT(avg[0]), LOAD_FRAC(avg[0]), LOAD_INT(avg[1]), LOAD_FRAC(avg[1]), LOAD_INT(avg[2]), LOAD_FRAC(avg[2]), total)
974  Return 0
Caller
NameDescribe
psi_io_show
psi_memory_show
psi_cpu_show