Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:queue @work to @stopper. if offline, @work is completed immediately

Proto:static bool cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work)

Type:bool

Parameter:

TypeParameterName
unsigned intcpu
struct cpu_stop_work *work
79  stopper = per_cpu(cpu_stopper, cpu)
84  Even if we don't have any preemption, we need preempt disable/enable* to be barriers, so that we don't have things like get_user/put_user* that can cause faults and scheduling migrate into our preempt-protected* region.()
85  raw_spin_lock_irqsave( & lock, flags)
86  enabled = s this stopper enabled?
87  If enabled Then __cpu_stop_queue_work(stopper, work, & wakeq)
89  Else if done Then signal completion unless @done is NULL
91  raw_spin_unlock_irqrestore( & lock, flags)
93  wake_up_q( & wakeq)
94  preempt_enable()
96  Return enabled
Caller
NameDescribe
stop_one_cpustop_one_cpu - stop a cpu*@cpu: cpu to stop*@fn: function to execute*@arg: argument to @fn* Execute @fn(@arg) on @cpu. @fn is run in a process context with* the highest priority preempting any task on the cpu and* monopolizing it
stop_one_cpu_nowaitstop_one_cpu_nowait - stop a cpu but don't wait for completion*@cpu: cpu to stop*@fn: function to execute*@arg: argument to @fn*@work_buf: pointer to cpu_stop_work structure* Similar to stop_one_cpu() but doesn't wait for completion
queue_stop_cpus_work