Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\core.c Create Date:2022-07-28 09:36:05
Last Modify:2022-05-22 13:40:38 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Pick up the highest-prio task:

Proto:static inline struct task_struct *pick_next_task(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
3922  If Value is more likely to compile time((sched_class == & idle_sched_class || sched_class == & fair_sched_class) && * nr_running and cpu_load should be in the same cacheline because * remote CPUs use both these fields when doing load calculation. == SCHED_{NORMAL,BATCH,IDLE} ) Then
3926  p = pick_next_task_fair(rq, prev, rf)
3927  If Value for the false possibility is greater at compile time(p == RETRY_TASK) Then Go to restart
3931  If Not p Then
3932  put_prev_task(rq, prev)
3936  Return p
3939  restart :
3955  put_prev_task(rq, prev)
3957  for_each_class(class)
3958  p = pick_next_task(rq)
3959  If p Then Return p
3964  BUG()
Caller
NameDescribe
__schedule__schedule() is the main scheduler function.* The main means of driving the scheduler and thus entering this function are:* 1. Explicit blocking: mutex, semaphore, waitqueue, etc.* 2. TIF_NEED_RESCHED flag is checked on interrupt and userspace return