Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\core.c Create Date:2022-07-28 09:36:00
Last Modify:2022-05-22 13:40:38 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:unsigned long long task_sched_runtime(struct task_struct *p)

Type:unsigned long long

Parameter:

TypeParameterName
struct task_struct *p
3570  rq = ask_rq_lock - lock p->pi_lock and lock the rq @p resides on.
3576  If task_current(rq, p) && task_on_rq_queued(p) Then
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  update_rq_clock(rq)
3579  update_curr(rq)
3581  ns = sum_exec_runtime
3582  task_rq_unlock(rq, p, & rf)
3584  Return ns
Caller
NameDescribe
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.