函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:pick_next_task_fair

函数原型:struct task_struct *pick_next_task_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)

返回类型:struct task_struct

参数:

类型参数名称
struct rq *rq
struct task_struct *prev
struct rq_flags *rf
6649  cfs_rq等于cfs
6654  again :
6655  如果非sched_fair_runnable(rq)则转到:idle
6736  如果prevput_prev_task(rq, prev)
6739  循环
6740  se等于Pick the next process, keeping these things in mind, in this order:* 1) keep things fair between processes/task groups* 2) pick the "next" process, since someone really wants that to run* 3) pick the "last" process, for cache locality* 4) do not run the
6741  set_next_entity(cfs_rq, se)
6742  cfs_rq等于queue "owned" by this group
6743 cfs_rq循环
6745  p等于CFS operations on generic schedulable entities:
6747  done :
6747  __maybe_unused
6757  如果hrtick_enabled(rq)则CFS operations on tasks:
6760  update_misfit_status(p, rq)
6762  返回:p
6764  idle :
6765  如果非rf则返回:NULL
6768  new_tasks等于newidle_balance(rq, rf)
6775  如果new_tasks小于0则返回:RETRY_TASK
6778  如果new_tasks大于0则转到:again
6785  update_idle_rq_clock_pelt(rq)
6787  返回:NULL
调用者
名称描述
__pick_next_task_fair
pick_next_task选择下一个要运行的进程