Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:pick_next_task_fair

Proto:struct task_struct *pick_next_task_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)

Type:struct task_struct

Parameter:

TypeParameterName
struct rq *rq
struct task_struct *prev
struct rq_flags *rf
6649  cfs_rq = cfs
6654  again :
6655  If Not sched_fair_runnable(rq) Then Go to idle
6736  If prev Then put_prev_task(rq, prev)
6739  Do
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  When cfs_rq cycle
6745  p = CFS operations on generic schedulable entities:
6747  done :
6747  __maybe_unused
6757  If hrtick_enabled(rq) Then CFS operations on tasks:
6760  update_misfit_status(p, rq)
6762  Return p
6764  idle :
6765  If Not rf Then Return NULL
6768  new_tasks = newidle_balance(rq, rf)
6775  If new_tasks < 0 Then Return RETRY_TASK
6778  If new_tasks > 0 Then Go to again
6785  update_idle_rq_clock_pelt(rq)
6787  Return NULL
Caller
NameDescribe
__pick_next_task_fair
pick_next_taskPick up the highest-prio task: