Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\fair.c Create Date:2022-07-28 09:38:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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:

Proto:static void enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)

Type:void

Parameter:

TypeParameterName
struct rq *rq
struct task_struct *p
intflags
5208  se = se
5209  idle_h_nr_running = task_has_idle_policy(p)
5217  util_est_enqueue( & cfs, p)
5224  If in_iowait Then cpufreq_update_util(rq, Interface between cpufreq drivers and the scheduler:)
5228  If on_rq Then Break
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  If cfs_rq_throttled(cfs_rq) Then Break
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  If cfs_rq_throttled(cfs_rq) Then Break
5255  update_load_avg(cfs_rq, se, UPDATE_TG)
5256  update_cfs_group(se)
5259  If Not se Then
5260  add_nr_running(rq, 1)
5275  If flags & ENQUEUE_WAKEUP Then update_overutilized_status(rq)
5280  If CFS bandwidth control machinery Then
5288  cfs_rq = cfs_rq_of(se)
5290  If list_add_leaf_cfs_rq(cfs_rq) Then Break
5295  assert_list_leaf_cfs_rq(rq)
5297  hrtick_update(rq)