Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\smp.c Create Date:2022-07-28 10:56:04
Last Modify:2020-03-17 15:12:54 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:_each_cpu_cond(): Call a function on each processor for which* the supplied function cond_func returns true, optionally waiting* for all the required CPUs to finish

Proto:void on_each_cpu_cond_mask(bool (*cond_func)(int cpu, void *info), smp_call_func_t func, void *info, bool wait, gfp_t gfp_flags, const struct cpumask *mask)

Type:void

Parameter:

TypeParameterName
bool (*cond_func
smp_call_func_tfunc
void *info
boolwait
gfp_tgfp_flags
const struct cpumask *mask
690  might_sleep_if(gfpflags_allow_blocking(gfp_flags))
692  If Value is more likely to compile time(zalloc_cpumask_var( & cpus, (gfp_flags | DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success.))) Then
693  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.()
694  for_each_cpu(cpu, mask)
695  If cond_func(cpu, info) Then __cpumask_set_cpu(cpu, cpus)
697  _each_cpu_mask(): Run a function on processors specified by* cpumask, which may include the local processor.*@mask: The set of cpus to run on (only runs on online subset).*@func: The function to run. This must be fast and non-blocking.
698  preempt_enable()
699  free_cpumask_var(cpus)
700  Else
705  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.()
706  for_each_cpu(cpu, mask)
707  If cond_func(cpu, info) Then
710  WARN_ON_ONCE(ret)
712  preempt_enable()
Caller
NameDescribe
on_each_cpu_cond