函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:psi_show

函数原型:int psi_show(struct seq_file *m, struct psi_group *group, enum psi_res res)

返回类型:int

参数:

类型参数名称
struct seq_file *m
struct psi_group *group
enum psi_resres
945  如果static_branch_likely( & psi_disabled)则返回:负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  如果now大于等于avg_next_updateavg_next_update等于update_averages(group, now)
954  mutex_unlock( & avgs_lock)
956 full小于2减res恒等于PSI_CPU的值循环
961 w小于3循环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  返回:0
调用者
名称描述
psi_io_show
psi_memory_show
psi_cpu_show