函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:The enqueue_task method is called before nr_running is* increased. Here we update the fair scheduling stats and* then put the task into the rbtree:

函数原型:static void enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)

返回类型:void

参数:

类型参数名称
struct rq *rq
struct task_struct *p
intflags
5208  se等于调度实体
5209  idle_h_nr_running等于task_has_idle_policy(p)
5217  util_est_enqueue( & cfs, p)
5224  如果in_iowaitcpufreq_update_util(rq, Interface between cpufreq drivers and the scheduler:)
5228  如果on_rq退出
5230  cfs_rq等于cfs_rq_of(se)
5231  MIGRATION* dequeue* update_curr()* update_min_vruntime()* vruntime -= min_vruntime* enqueue* update_curr()* update_min_vruntime()* vruntime += min_vruntime* this way the vruntime transition between RQs is done when both* min_vruntime are up-to-date
5239  如果cfs_rq_throttled(cfs_rq)则退出
5241  SCHED_{NORMAL,BATCH,IDLE} 自加
5242  SCHED_IDLE 加等于idle_h_nr_running
5244  flags等于ENQUEUE_WAKEUP
5248  cfs_rq等于cfs_rq_of(se)
5249  SCHED_{NORMAL,BATCH,IDLE} 自加
5250  SCHED_IDLE 加等于idle_h_nr_running
5252  如果cfs_rq_throttled(cfs_rq)则退出
5255  update_load_avg(cfs_rq, se, UPDATE_TG)
5256  update_cfs_group(se)
5259  如果非se
5260  add_nr_running(rq, 1)
5275  如果flags按位与ENQUEUE_WAKEUPupdate_overutilized_status(rq)
5280  如果CFS bandwidth control machinery
5288  cfs_rq等于cfs_rq_of(se)
5290  如果list_add_leaf_cfs_rq(cfs_rq)则退出
5295  assert_list_leaf_cfs_rq(rq)
5297  hrtick_update(rq)