函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Enqueue an SRCU callback on the srcu_data structure associated with* the current CPU and the specified srcu_struct structure, initiating* grace-period processing if it is not already running

函数原型:static void __call_srcu(struct srcu_struct *ssp, struct callback_head *rhp, rcu_callback_t func, bool do_norm)

返回类型:void

参数:

类型参数名称
struct srcu_struct *ssp
struct callback_head *rhp
rcu_callback_tfunc
booldo_norm
840  bool needexp = false
841  bool needgp = false
845  First-use initialization of statically allocated srcu_struct* structure
846  如果debug_rcu_head_queue()/debug_rcu_head_unqueue() are used internally* by call_rcu() and rcu callback execution, and are therefore not part* of the RCU API. These are in rcupdate.h because they are used by all* RCU implementations.
848  WRITE_ONCE(func, SRCU callback function to leak a callback.)
849  WARN_ONCE(1, "call_srcu(): Leaked duplicate callback\n")
850  返回
852  func等于func
853  idx等于srcu_read_lock - register a new reader for an SRCU-protected structure
854  local_irq_save(flags)
855  sdp等于this_cpu_ptr(sda)
856  Wrappers for lock acquisition and release, see raw_spin_lock_rcu_node(). (sdp)
857  rcu_segcblist_enqueue( & srcu_cblist, rhp, false)
858  Advance the callbacks in the specified rcu_segcblist structure based* on the current value passed in for the grace-period counter.
860  s等于_seq_snap - Take a snapshot of the update side's sequence number.* This function returns the earliest value of the grace-period sequence number* that will indicate that a full grace period has elapsed since the current* time
861  "Accelerate" callbacks based on more-accurate grace-period information
862  如果ULONG_CMP_LT(srcu_gp_seq_needed, s)则
863  srcu_gp_seq_needed等于s
864  needgp = true
866  如果非do_normULONG_CMP_LT(srcu_gp_seq_needed_exp, s)则
867  srcu_gp_seq_needed_exp等于s
868  needexp = true
870  spin_unlock_irqrestore_rcu_node(sdp, flags)
871  如果needgpFunnel-locking scheme to scalably mediate many concurrent grace-period* requests
873  否则如果needexpFunnel-locking scheme to scalably mediate many concurrent expedited* grace-period requests. This function is invoked for the first known* expedited request for a grace period that has already been requested,* but without expediting
875  注销过期读锁
调用者
名称描述
call_srcuall_srcu() - Queue a callback for invocation after an SRCU grace period*@ssp: srcu_struct in queue the callback*@rhp: structure to be used for queueing the SRCU callback
__synchronize_srcuHelper function for synchronize_srcu() and synchronize_srcu_expedited().