Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Funnel-locking scheme to scalably mediate many concurrent grace-period* requests

Proto:static void srcu_funnel_gp_start(struct srcu_struct *ssp, struct srcu_data *sdp, unsigned long s, bool do_norm)

Type:void

Parameter:

TypeParameterName
struct srcu_struct *ssp
struct srcu_data *sdp
unsigned longs
booldo_norm
635  idx = Return the counter portion of a sequence number previously returned* by rcu_seq_snap() or rcu_seq_current(). % ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(srcu_have_cbs)
636  snp = mynode
640  When snp != NULL cycle
641  If Given a snapshot from rcu_seq_snap(), determine whether or not a* full update-side operation has occurred. && snp != mynode Then Return
643  spin_lock_irqsave_rcu_node(snp, flags)
644  If ULONG_CMP_GE(srcu_have_cbs[idx], s) Then
646  If snp == mynode && snp_seq == s Then srcu_data_have_cbs[idx] |= grpmask
649  If snp == mynode && snp_seq != s Then
657  Return
659  srcu_have_cbs[idx] = s
660  If snp == mynode Then srcu_data_have_cbs[idx] |= grpmask
662  If Not do_norm && ULONG_CMP_LT(srcu_gp_seq_needed_exp, s) Then srcu_gp_seq_needed_exp = s
664  spin_unlock_irqrestore_rcu_node(snp, flags)
668  spin_lock_irqsave_rcu_node(ssp, flags)
669  If ULONG_CMP_LT(srcu_gp_seq_needed, s) Then
674  smp_store_release( & srcu_gp_seq_needed, s)
676  If Not do_norm && ULONG_CMP_LT(srcu_gp_seq_needed_exp, s) Then srcu_gp_seq_needed_exp = s
680  If Not Given a snapshot from rcu_seq_snap(), determine whether or not a* full update-side operation has occurred. && Return the state portion of a sequence number previously returned* by rcu_seq_snap() or rcu_seq_current(). == SRCU_STATE_IDLE Then
682  WARN_ON_ONCE(ULONG_CMP_GE(srcu_gp_seq, srcu_gp_seq_needed))
683  Start an SRCU grace period.
684  If Value is more likely to compile time(srcu_init_done) Then queue_delayed_work - queue work on a workqueue after delay*@wq: workqueue to use*@dwork: delayable work to queue*@delay: number of jiffies to wait before queueing* Equivalent to queue_delayed_work_on() but tries to use the local CPU.
687  Else if list_empty - tests whether a list is empty*@head: the list to test. Then list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
690  spin_unlock_irqrestore_rcu_node(ssp, flags)
Caller
NameDescribe
__call_srcuEnqueue 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