函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:We 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

函数原型:int sched_dl_overflow(struct task_struct *p, int policy, const struct sched_attr *attr)

返回类型:int

参数:

类型参数名称
struct task_struct *p
intpolicy
const struct sched_attr *attr
2552  dl_b等于dl_bw_of(task_cpu(p))
2553  period等于如果sched_period否则sched_deadline
2554  runtime等于SCHED_DEADLINE
2555  new_bw等于如果dl_policy(policy)则to_ratio(period, runtime)否则0
2556  err等于负1
2558  如果sched_flags按位与!! 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则返回:0
2562  如果new_bw恒等于 dl_runtime / dl_period task_has_dl_policy(p)则返回:0
2570  raw_spin_lock( & lock)
2571  cpus等于dl_bw_cpus(task_cpu(p))
2572  如果dl_policy(policy)且非task_has_dl_policy(p)且非__dl_overflow(dl_b, cpus, 0, new_bw)则
2574  如果hrtimer_active( & * 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)则__dl_sub(dl_b, dl_runtime / dl_period , cpus)
2576  __dl_add(dl_b, new_bw, cpus)
2577  err等于0
2578  否则如果dl_policy(policy)且task_has_dl_policy(p)且非__dl_overflow(dl_b, cpus, dl_runtime / dl_period , new_bw)则
2587  __dl_sub(dl_b, dl_runtime / dl_period , cpus)
2588  __dl_add(dl_b, new_bw, cpus)
2589  dl_change_utilization(p, new_bw)
2590  err等于0
2591  否则如果非dl_policy(policy)且task_has_dl_policy(p)则
2597  err等于0
2599  raw_spin_unlock( & lock)
2601  返回:err
调用者
名称描述
__sched_setscheduler