函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:int cpupri_find(struct cpupri *cp, struct task_struct *p, struct cpumask *lowest_mask)

返回类型:int

参数:

类型参数名称
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 idx小于task_pri循环
68  vec等于pri_to_cpu[idx]
69  skip等于0
71  如果非atomic_read( & count)则skip等于1
91  smp_rmb()
94  如果skip则继续下一循环
97  如果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则继续下一循环
100  如果lowest_mask
115  返回:1
118  返回:0