函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Adjust tick based cputime random precision against scheduler runtime* accounting

函数原型:void cputime_adjust(struct task_cputime *curr, struct prev_cputime *prev, u64 *ut, u64 *st)

返回类型:void

参数:

类型参数名称
struct task_cputime *curr
struct prev_cputime *prev
u64 *ut
u64 *st
596  raw_spin_lock_irqsave( & lock, flags)
597  rtime等于sum_exec_runtime
607  如果stimeutime大于等于rtime则转到:out
610  stime等于stime
611  utime等于utime
618  如果stime恒等于0则
619  utime等于rtime
620  转到:update
623  如果utime恒等于0则
624  stime等于rtime
625  转到:update
628  stime等于Perform (stime * rtime) / total, but avoid multiplication overflow by* losing precision when the numbers are big.
630  update :
640  如果stime小于stimestime等于stime
642  utime等于rtimestime
648  如果utime小于utime
649  utime等于utime
650  stime等于rtimeutime
653  stime等于stime
654  utime等于utime
655  out :
656  ut等于utime
657  st等于stime
658  raw_spin_unlock_irqrestore( & lock, flags)
调用者
名称描述
task_cputime_adjusted
thread_group_cputime_adjusted
cgroup_base_stat_cputime_show