函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\membarrier.c Create Date:2022-07-27 10:45:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:sync_runqueues_membarrier_state

函数原型:static int sync_runqueues_membarrier_state(struct mm_struct *mm)

返回类型:int

参数:

类型参数名称
struct mm_struct *mm
202  membarrier_state等于atomic_read( & membarrier_state)
206  如果atomic_read( & *@mm_users: The number of users including userspace. * Use mmget()/mmget_not_zero()/mmput() to modify. When this * drops to 0 (i.e. when the task exits and there are no other * temporary reference holders), we also release a reference on *@mm_count (which )恒等于1或num_online_cpus()恒等于1则
207  抢占保护下的写CPU(membarrier_state, membarrier_state)
216  smp_mb()
217  返回:0
220  如果非zalloc_cpumask_var( & tmpmask, GFP_KERNEL)则返回:负ENOMEM
228  synchronize_rcu()
237  cpus_read_lock()
238  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
239  遍历在线CPU(cpu)
240  rq等于cpu_rq(cpu)
243  p等于cu_dereference() - fetch RCU-protected pointer for dereferencing*@p: The pointer to read, prior to dereferencing* This is a simple wrapper around rcu_dereference_check().(当前任务)
244  如果p内存信息恒等于mm__cpumask_set_cpu(cpu, tmpmask)
247  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
249  禁止抢占()
250  smp_call_function_many(tmpmask, ipi_sync_rq_state, mm, 1)
251  禁用抢占和中断()
253  释放CPU掩码
254  cpus_read_unlock()
256  返回:0
调用者
名称描述
membarrier_register_global_expedited
membarrier_register_private_expedited