函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:When queueing an unbound work item to a wq, prefer local CPU if allowed* by wq_unbound_cpumask. Otherwise, round robin among the allowed ones to* avoid perturbing sensitive tasks.

函数原型:static int wq_select_unbound_cpu(int cpu)

返回类型:int

参数:

类型参数名称
intcpu
1366  如果此条件成立可能性大(为编译器优化)(!wq_debug_force_rr_cpu)则
1367  如果测试CPU信息则返回:cpu
1369  否则如果非printed_dbg_warning
1370  打印警告信息("workqueue: round-robin CPU selection forced, expect performance impact\n")
1371  printed_dbg_warning = true
1374  如果pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear.则返回:cpu
1377  new_cpu等于Operations for contexts that are safe from preemption/interrupts. These* operations verify that preemption is disabled.(CPU where unbound work was last round robin scheduled from this CPU )
1378  new_cpu等于cpumask_next_and(new_cpu, PL: allowable cpus for unbound wqs and work items , cpu_online_mask)
1379  如果此条件成立可能性小(为编译器优化)(new_cpu >= nr_cpu_ids)则
1380  new_cpu等于cpumask_first_and - return the first cpu from *srcp1 & *srcp2*@src1p: the first input*@src2p: the second input* Returns >= nr_cpu_ids if no cpus set in both. See also cpumask_next_and().(PL: allowable cpus for unbound wqs and work items , cpu_online_mask)
1381  如果此条件成立可能性小(为编译器优化)(new_cpu >= nr_cpu_ids)则返回:cpu
1384  __this_cpu_write(CPU where unbound work was last round robin scheduled from this CPU , new_cpu)
1386  返回:new_cpu
调用者
名称描述
__queue_work