函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Update the current task's runtime statistics (provided it is still* a -deadline task and has not been removed from the dl_rq).

函数原型:static void update_curr_dl(struct rq *rq)

返回类型:void

参数:

类型参数名称
struct rq *rq
1181  curr等于当前任务
1182  dl_se等于dl
1184  cpu等于根据rq获取CPU
1187  如果非dl_task(curr)或非on_dl_rq(dl_se)则返回
1198  now等于rq_clock_task(rq)
1199  delta_exec等于nowexec_start
1200  如果此条件成立可能性小(为编译器优化)((s64)delta_exec <= 0)则
1201  如果此条件成立可能性小(为编译器优化)(dl_yielded)则转到:throttle
1203  返回
1206  schedstat_set(exec_max, 两数取大(exec_max, delta_exec))
1209  sum_exec_runtime加等于delta_exec
1210  account_group_exec_runtime - Maintain exec runtime for a thread group
1212  exec_start等于now
1213  cgroup_account_cputime(curr, delta_exec)
1215  如果dl_entity_is_special(dl_se)则返回
1225  如果此条件成立可能性小(为编译器优化)( Specifying the scheduler behaviour & SCHED_FLAG_RECLAIM)则
1226  scaled_delta_exec等于This function implements the GRUB accounting rule:* according to the GRUB reclaiming algorithm, the runtime is* not decreased as "dq = -dt", but as* "dq = -max{u / Umax, (1 - Uinact - Uextra)} dt",* where u is the utilization of the task, Umax is the
1229  否则
1230  scale_freq等于arch_scale_freq_capacity(cpu)
1231  scale_cpu等于arch_scale_cpu_capacity(cpu)
1233  scaled_delta_exec等于cap_scale(delta_exec, scale_freq)
1234  scaled_delta_exec等于cap_scale(scaled_delta_exec, scale_cpu)
1237  Remaining runtime for this instance 减等于scaled_delta_exec
1239  throttle :
1240  如果dl_runtime_exceeded(dl_se)或dl_yielded
1241  * Some bool flags: *@dl_throttled tells if we exhausted the runtime. If so, the * task has to wait for a replenishment to be performed at the * next firing of dl_timer. *@dl_boosted tells if we are boosted due to DI. If so we are * outside bandwidth enforc等于1
1244  如果dl_runtime_exceeded(dl_se)且 Specifying the scheduler behaviour 按位与SCHED_FLAG_DL_OVERRUNdl_overrun等于1
1248  __dequeue_task_dl(rq, curr, 0)
1249  如果此条件成立可能性小(为编译器优化)(dl_boosted || !If the entity depleted all its runtime, and if we want it to sleep* while waiting for some new execution time to become available, we* set the bandwidth replenishment timer to the replenishment instant* and try to activate it)则enqueue_task_dl(rq, curr, ENQUEUE_REPLENISH)
1252  如果非is_leftmost(curr, & dl)则标记当前进程需要被调度出去
1267  如果rt_bandwidth_enabled()则
1268  rt_rq等于rt
1270  raw_spin_lock( & Nests inside the rq lock: )
1276  如果sched_rt_bandwidth_account(rt_rq)则rt_time加等于delta_exec
1278  raw_spin_unlock( & Nests inside the rq lock: )
调用者
名称描述
dequeue_task_dl
yield_task_dlYield task semantic for -deadline tasks is:* get off from the CPU until our next instance, with* a new runtime
put_prev_task_dl
task_tick_dlscheduler tick hitting a task of our scheduling class