函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Funnel-locking scheme to scalably mediate many concurrent grace-period* requests

函数原型:static void srcu_funnel_gp_start(struct srcu_struct *ssp, struct srcu_data *sdp, unsigned long s, bool do_norm)

返回类型:void

参数:

类型参数名称
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 snp != NULL循环
641  如果Given a snapshot from rcu_seq_snap(), determine whether or not a* full update-side operation has occurred.snp不等于mynode则返回
643  spin_lock_irqsave_rcu_node(snp, flags)
644  如果ULONG_CMP_GE(srcu_have_cbs[idx], s)则
645  snp_seq等于srcu_have_cbs[idx]
646  如果snp恒等于mynodesnp_seq恒等于ssrcu_data_have_cbs[idx]或等于grpmask
649  如果snp恒等于mynodesnp_seq不等于s
657  返回
659  srcu_have_cbs[idx]等于s
660  如果snp恒等于mynodesrcu_data_have_cbs[idx]或等于grpmask
662  如果非do_normULONG_CMP_LT(srcu_gp_seq_needed_exp, s)则srcu_gp_seq_needed_exp等于s
664  spin_unlock_irqrestore_rcu_node(snp, flags)
668  spin_lock_irqsave_rcu_node(ssp, flags)
669  如果ULONG_CMP_LT(srcu_gp_seq_needed, s)则
674  smp_store_release( & srcu_gp_seq_needed, s)
676  如果非do_normULONG_CMP_LT(srcu_gp_seq_needed_exp, s)则srcu_gp_seq_needed_exp等于s
680  如果非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
682  WARN_ON_ONCE(ULONG_CMP_GE(srcu_gp_seq, srcu_gp_seq_needed))
683  Start an SRCU grace period.
684  如果此条件成立可能性大(为编译器优化)(srcu_init_done)则启动延迟工作队列
687  否则如果链表为空添加链表项
690  spin_unlock_irqrestore_rcu_node(ssp, flags)
调用者
名称描述
__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