函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:set_load_weight

函数原型:static void set_load_weight(struct task_struct *p, bool update_load)

返回类型:void

参数:

类型参数名称
struct task_struct *p
boolupdate_load
750  prio等于静态优先级MAX_RT_PRIO
751  load等于 For load-balancing:
756  如果task_has_idle_policy(p)则
757  weight等于scale_load(To aid in avoiding the subversion of "niceness" due to uneven distribution* of tasks with abnormal "nice" values across CPUs the contribution that* each task makes to its run queue's load is weighted according to its* scheduling class and "nice" value)
758  inv_weight等于WMULT_IDLEPRIO
759  runnable_weight等于weight
760  返回
767  如果update_load调度函数恒等于fair_sched_class
768  reweight_task(p, prio)
769  否则
770  weight等于scale_load(sched_prio_to_weight[prio])
771  inv_weight等于sched_prio_to_wmult[prio]
772  runnable_weight等于weight
调用者
名称描述
sched_fork调度进程
set_user_nice
__setscheduler_params
sched_init初始化调度器数据结构并创建运行队列