Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static void enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)

Type:void

Parameter:

TypeParameterName
struct cfs_rq *cfs_rq
struct sched_entity *se
intflags
3980  renorm = Not (flags & ENQUEUE_WAKEUP) || flags & ENQUEUE_MIGRATED
3981  curr = 'curr' points to currently running entity on this cfs_rq.* It is set to NULL otherwise (i.e when none are currently running). == se
3987  If renorm && curr Then vruntime += min_vruntime
3990  Update the current task's runtime statistics.
3998  If renorm && Not curr Then vruntime += min_vruntime
4009  update_load_avg(cfs_rq, se, UPDATE_TG | DO_ATTACH)
4010  update_cfs_group(se)
4011  enqueue_runnable_load_avg(cfs_rq, se)
4012  account_entity_enqueue(cfs_rq, se)
4014  If flags & ENQUEUE_WAKEUP Then place_entity(cfs_rq, se, 0)
4017  check_schedstat_required()
4018  Task is being enqueued - update stats:
4019  check_spread(cfs_rq, se)
4020  If Not curr Then Enqueue an entity into the rb-tree:
4022  on_rq = 1
4024  If nr_running == 1 Then
4025  list_add_leaf_cfs_rq(cfs_rq)
4026  check_enqueue_throttle(cfs_rq)
Caller
NameDescribe
enqueue_task_fairThe 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: