Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:static void __call_srcu(struct srcu_struct *ssp, struct callback_head *rhp, rcu_callback_t func, bool do_norm)

Type:void

Parameter:

TypeParameterName
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  If 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. Then
848  WRITE_ONCE(func, SRCU callback function to leak a callback.)
849  WARN_ONCE(1, "call_srcu(): Leaked duplicate callback\n")
850  Return
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  If ULONG_CMP_LT(srcu_gp_seq_needed, s) Then
863  srcu_gp_seq_needed = s
864  needgp = true
866  If Not do_norm && ULONG_CMP_LT(srcu_gp_seq_needed_exp, s) Then
867  srcu_gp_seq_needed_exp = s
868  needexp = true
870  spin_unlock_irqrestore_rcu_node(sdp, flags)
871  If needgp Then Funnel-locking scheme to scalably mediate many concurrent grace-period* requests
873  Else if needexp Then Funnel-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  srcu_read_unlock - unregister a old reader from an SRCU-protected structure.*@ssp: srcu_struct in which to unregister the old reader.*@idx: return value from corresponding srcu_read_lock().* Exit an SRCU read-side critical section.
Caller
NameDescribe
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().