函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:dl_change_utilization

函数原型:void dl_change_utilization(struct task_struct *p, u64 new_bw)

返回类型:void

参数:

类型参数名称
struct task_struct *p
u64new_bw
160  BUG_ON( Specifying the scheduler behaviour & !! For sched_setattr_nocheck() (kernel) only !!* This is actually gross. :(* It is used to make schedutil kworker(s) higher priority than SCHED_DEADLINE* tasks, but still be able to sleep. We need this on platforms that cannot)
162  如果进程处于任务队列则返回
165  rq等于task_rq(p)
166  如果dl_non_contending
167  sub_running_bw( & dl, & dl)
168  dl_non_contending等于0
176  如果hrtimer_try_to_cancel( & * Inactive timer, responsible for decreasing the active utilization * at the "0-lag time". When a -deadline task blocks, it contributes * to GRUB's active utilization until the "0-lag time", hence a * timer is needed to decrease the active utilization at t)恒等于1则put_task_struct(p)
179  __sub_rq_bw( dl_runtime / dl_period , & dl)
180  __add_rq_bw(new_bw, & dl)
调用者
名称描述
sched_dl_overflowWe must be sure that accepting a new task (or allowing changing the* parameters of an existing one) is consistent with the bandwidth* constraints. If yes, this function also accordingly updates the currently