函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:set_next_entity

函数原型:static void set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)

返回类型:void

参数:

类型参数名称
struct cfs_rq *cfs_rq
struct sched_entity *se
4173  如果on_rq
4179  update_stats_wait_end(cfs_rq, se)
4180  __dequeue_entity(cfs_rq, se)
4181  update_load_avg(cfs_rq, se, UPDATE_TG)
4184  We are picking a new current task - update its stats:
4185  'curr' points to currently running entity on this cfs_rq.* It is set to NULL otherwise (i.e when none are currently running).等于se
4192  如果schedstat_enabled()且weight大于等于2乘weight
4194  schedstat_set(slice_max, 两数取大((u64)schedstat_val(slice_max), sum_exec_runtime - prev_sum_exec_runtime))
4199  prev_sum_exec_runtime等于sum_exec_runtime
调用者
名称描述
pick_next_task_fair
set_next_task_fairAccount for a task changing its policy or group.* This routine is mostly called to set cfs_rq->curr field when a task* migrates between groups/classes.