函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\core.c Create Date:2022-07-27 10:36:37
Last Modify:2022-05-22 13:40:38 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Return accounted runtime for the task.* In case the task is currently running, return the runtime plus current's* pending runtime that have not been accounted yet.

函数原型:unsigned long long task_sched_runtime(struct task_struct *p)

返回类型:unsigned long long

参数:

类型参数名称
struct task_struct *p
3570  rq等于ask_rq_lock - lock p->pi_lock and lock the rq @p resides on.
3576  如果task_current(rq, p)且进程处于任务队列
3577  The function fair_sched_class.update_curr accesses the struct curr* and its field curr->exec_start; when called from task_sched_runtime(),* we observe a high rate of cache misses in practice.* Prefetching this data results in improved performance.
3578  更新rq运行时间
3579  update_curr(rq)
3581  ns等于sum_exec_runtime
3582  task_rq_unlock(rq, p, & rf)
3584  返回:ns
调用者
名称描述
thread_group_cputimeAccumulate raw cputime values of dead tasks (sig->[us]time) and live* tasks (sum on group iteration) belonging to @tsk's group.
cpu_clock_sampleSample a per-thread clock for the given task. clkid is validated.