Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:pupri_find - find the best (lowest-pri) CPU in the system*@cp: The cpupri context*@p: The task*@lowest_mask: A mask to fill in with selected CPUs (or NULL)* Note: This function returns the recommended CPUs as calculated during the* current invocation

Proto:int cpupri_find(struct cpupri *cp, struct task_struct *p, struct cpumask *lowest_mask)

Type:int

Parameter:

TypeParameterName
struct cpupri *cp
struct task_struct *p
struct cpumask *lowest_mask
62  idx = 0
63  task_pri = Convert between a 140 based task->prio, and our 102 based cpupri
65  BUG_ON(task_pri >= SPDX-License-Identifier: GPL-2.0 )
67  When idx < task_pri cycle
68  vec = pri_to_cpu[idx]
69  skip = 0
71  If Not atomic_read( & count) Then skip = 1
91  smp_rmb()
94  If skip Then Continue
97  If cpumask_any_and - pick a "random" cpu from *mask1 & *mask2*@mask1: the first input cpumask*@mask2: the second input cpumask* Returns >= nr_cpu_ids if no cpus set.(cpus_ptr, mask) >= nr_cpu_ids Then Continue
100  If lowest_mask Then
115  Return 1
118  Return 0