函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static void enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)

返回类型:void

参数:

类型参数名称
struct cfs_rq *cfs_rq
struct sched_entity *se
intflags
3980  renorm等于非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  如果renormcurrvruntime加等于min_vruntime
3990  更新当前进程运行时间,包括虚拟运行时间
3998  如果renorm且非currvruntime加等于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  如果flags按位与ENQUEUE_WAKEUPplace_entity(cfs_rq, se, 0)
4017  check_schedstat_required()
4018  Task is being enqueued - update stats:
4019  check_spread(cfs_rq, se)
4020  如果非currEnqueue an entity into the rb-tree:
4022  on_rq等于1
4024  如果nr_running恒等于1则
4025  list_add_leaf_cfs_rq(cfs_rq)
4026  check_enqueue_throttle(cfs_rq)
调用者
名称描述
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: