Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Workqueues which may be used during memory reclaim should have a rescuer* to guarantee forward progress.

Proto:static int init_rescuer(struct workqueue_struct *wq)

Type:int

Parameter:

TypeParameterName
struct workqueue_struct *wq
4198  If Not (hot fields used during command issue, aligned to cacheline & WQ_MEM_RECLAIM) Then Return 0
4201  rescuer = alloc_worker(NUMA_NO_NODE)
4202  If Not rescuer Then Return -ENOMEM
4205  I: the workqueue to rescue = wq
4206  I: worker task = Create kernel thread(scuer_thread - the rescuer thread function*@__rescuer: self* Workqueue rescuer thread function, rescuer, "%s", I: workqueue name )
4207  ret = PTR_ERR_OR_ZERO(I: worker task )
4208  If ret Then
4209  free previously allocated memory
4210  Return ret
4213  MD: rescue worker = rescuer
4214  kthread_bind_mask(I: worker task , cpu_possible_mask)
4215  wake_up_process(I: worker task )
4217  Return 0
Caller
NameDescribe
alloc_workqueue
workqueue_initworkqueue_init - bring workqueue subsystem fully online* This is the latter half of two-staged workqueue subsystem initialization* and invoked as soon as kthreads can be created and scheduled