Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:static struct sched_entity *pick_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *curr)

Type:struct sched_entity

Parameter:

TypeParameterName
struct cfs_rq *cfs_rq
struct sched_entity *curr
4215  left = __pick_first_entity(cfs_rq)
4222  If Not left || curr && entity_before(curr, left) Then left = curr
4225  se = left
4231  If skip == se Then
4234  If se == curr Then
4236  Else
4238  If Not second || curr && entity_before(curr, second) Then second = curr
4242  If second && wakeup_preempt_entity(second, left) < 1 Then se = second
4249  If last && wakeup_preempt_entity(last, left) < 1 Then se = last
4255  If next && wakeup_preempt_entity(next, left) < 1 Then se = next
4258  clear_buddies(cfs_rq, se)
4260  Return se
Caller
NameDescribe
pick_next_task_fair