函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Update CPU-local rcu_data state to record the beginnings and ends of* grace periods. The caller must hold the ->lock of the leaf rcu_node* structure corresponding to the current CPU, and must have irqs disabled.

函数原型:static bool __note_gp_changes(struct rcu_node *rnp, struct rcu_data *rdp)

返回类型:bool

参数:

类型参数名称
struct rcu_node *rnp
struct rcu_data *rdp
1392  bool ret = false
1394  offloaded等于IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_RCU_NOCB_CPU)且Is the specified rcu_segcblist offloaded?
1397  raw_lockdep_assert_held_rcu_node(rnp)
1399  如果Track rsp->rcu_gp_seq counter. 恒等于Track rsp->rcu_gp_seq. 则返回:false
1403  如果Has a grace period completed since the time the old gp_seq was collected?此条件成立可能性小(为编译器优化)(READ_ONCE(Possible ->gp_seq wrap. ))则
1405  如果非offloadedret等于Move any callbacks whose grace period has completed to the* RCU_DONE_TAIL sublist, then compact the remaining sublists and* assign ->gp_seq numbers to any callbacks in the RCU_NEXT_TAIL* sublist. This function is idempotent, so it does not hurt to
1407  trace_rcu_grace_period(Name of structure. , Track rsp->rcu_gp_seq counter. , Strings used in tracepoints need to be exported via the* tracing system such that tools like perf and trace-cmd can* translate the string address pointers to actual text.("cpuend"))
1408  否则
1409  如果非offloadedret等于If there is room, assign a ->gp_seq number to any callbacks on this* CPU that have not already been assigned
1414  如果Has a grace period started since the time the old gp_seq was collected?此条件成立可能性小(为编译器优化)(READ_ONCE(Possible ->gp_seq wrap. ))则
1421  trace_rcu_grace_period(Name of structure. , Track rsp->rcu_gp_seq. , Strings used in tracepoints need to be exported via the* tracing system such that tools like perf and trace-cmd can* translate the string address pointers to actual text.("cpustart"))
1422  need_gp等于非非CPUs or groups that need to switch in 按位与Mask to apply to leaf qsmask. 的值
1423  norm等于need_gp
1424  Core waits for quiesc state. 等于need_gp
1425  zero_cpu_stall_ticks(rdp)
1427  Track rsp->rcu_gp_seq counter. 等于Track rsp->rcu_gp_seq.
1428  如果ULONG_CMP_LT(Track furthest future GP request. , Track furthest future GP request. )或Possible ->gp_seq wrap. Track furthest future GP request. 等于Track furthest future GP request.
1430  WRITE_ONCE(Possible ->gp_seq wrap. , false)
1431  We are reporting a quiescent state on behalf of some other CPU, so* it is our responsibility to check for and handle potential overflow* of the rcu_node ->gp_seq counter with respect to the rcu_data counters
1432  返回:ret
调用者
名称描述
note_gp_changes
rcu_gp_initInitialize a new grace period. Return false if no grace period required.
rcu_gp_cleanupClean up after the old grace period.