Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:workqueue_select_cpu_near - Select a CPU based on NUMA node*@node: NUMA node ID that we want to select a CPU from* This function will attempt to find a "random" cpu available on a given* node

Proto:static int workqueue_select_cpu_near(int node)

Type:int

Parameter:

TypeParameterName
intnode
1536  If Not unbound NUMA affinity enabled Then Return WORK_CPU_UNBOUND
1540  If node < 0 || node >= MAX_NUMNODES || Not node_online(node) Then Return WORK_CPU_UNBOUND
1544  cpu = These macros fold the SMP functionality into a single CPU system()
1545  If node == cpu_to_node(cpu) Then Return cpu
1549  cpu = 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.(Returns a pointer to the cpumask of CPUs on Node 'node'. , cpu_online_mask)
1552  Return If cpu < nr_cpu_ids Then cpu Else WORK_CPU_UNBOUND
Caller
NameDescribe
queue_work_nodequeue_work_node - queue work on a "random" cpu for a given NUMA node*@node: NUMA node that we are targeting the work for*@wq: workqueue to use*@work: work to queue* We queue the work to a "random" CPU within a given NUMA node