Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static int wq_select_unbound_cpu(int cpu)

Type:int

Parameter:

TypeParameterName
intcpu
1366  If Value is more likely to compile time(!wq_debug_force_rr_cpu) Then
1367  If pumask_test_cpu - test for a cpu in a cpumask*@cpu: cpu number (< nr_cpu_ids)*@cpumask: the cpumask pointer* Returns 1 if @cpu is set in @cpumask, else returns 0 Then Return cpu
1369  Else if Not printed_dbg_warning Then
1370  pr_warn("workqueue: round-robin CPU selection forced, expect performance impact\n")
1371  printed_dbg_warning = true
1374  If pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear. Then Return 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  If Value for the false possibility is greater at compile time(new_cpu >= nr_cpu_ids) Then
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  If Value for the false possibility is greater at compile time(new_cpu >= nr_cpu_ids) Then Return cpu
1384  __this_cpu_write(CPU where unbound work was last round robin scheduled from this CPU , new_cpu)
1386  Return new_cpu
Caller
NameDescribe
__queue_work