函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Initialize a new grace period. Return false if no grace period required.

函数原型:static bool rcu_gp_init(void)

返回类型:bool

参数:

1472  rnp等于Return the root node of the rcu_state structure.
1474  WRITE_ONCE(Time of last GP kthread , jiffies)
1475  raw_spin_lock_irq_rcu_node(rnp)
1476  如果非READ_ONCE(Commands for GP task. )则
1478  raw_spin_unlock_irq_rcu_node(rnp)
1479  返回:false
1481  WRITE_ONCE(Commands for GP task. , 0)
1483  如果WARN_ON_ONCE(Return true if an RCU grace period is in progress. The READ_ONCE()s* permit this function to be invoked without holding the root rcu_node* structure's ->lock, but of course results can be subject to change.)则
1488  raw_spin_unlock_irq_rcu_node(rnp)
1489  返回:false
1493  Forward declarations for tree_stall.h
1495  Adjust sequence number for start of update-side operation.
1496  trace_rcu_grace_period(Name of structure. , Grace-period sequence #. , 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.("start"))
1497  raw_spin_unlock_irq_rcu_node(rnp)
1505  GP kthread sleep state. 等于Grace-period initialization hotplug.
1507  raw_spin_lock( & ofl_lock)
1508  raw_spin_lock_irq_rcu_node(rnp)
1509  如果qsmaskinit恒等于ginning of each grace period. 且非Necessary to wait for blocked tasks to
1512  raw_spin_unlock_irq_rcu_node(rnp)
1513  raw_spin_unlock( & ofl_lock)
1514  继续下一循环
1518  oldmask等于qsmaskinit
1519  qsmaskinit等于ginning of each grace period.
1522  如果非oldmask不等于非qsmaskinit
1523  如果非oldmask
1526  否则如果rcu_preempt_has_tasks(rnp)则
1528  否则
1541  如果Necessary to wait for blocked tasks to 且非rcu_preempt_has_tasks(rnp)或qsmaskinit的值则
1543  Necessary to wait for blocked tasks to = false
1544  如果非qsmaskinitrcu_cleanup_dead_rnp(rnp)
1548  raw_spin_unlock_irq_rcu_node(rnp)
1549  raw_spin_unlock( & ofl_lock)
1551  rcu_gp_slow(Delay in jiffies for grace-period initialization delays, debug only. )
1565  GP kthread sleep state. 等于Grace-period initialization.
1566  rcu_for_each_node_breadth_first(rnp)
1567  rcu_gp_slow(gp_init_delay)
1568  raw_spin_lock_irqsave_rcu_node(rnp, flags)
1569  rdp等于this_cpu_ptr( & rcu_data)
1570  rcu_preempt_check_blocked_tasks(rnp)
1571  CPUs or groups that need to switch in 等于qsmaskinit
1572  WRITE_ONCE(Track rsp->rcu_gp_seq. , Grace-period sequence #. )
1573  如果rnp恒等于This CPU's leaf of hierarchy 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.
1575  rcu_preempt_boost_start_gp(rnp)
1576  trace_rcu_grace_period_init(Name of structure. , Track rsp->rcu_gp_seq. , is at level 0. , lowest-numbered CPU or group here. , highest-numbered CPU or group here. , CPUs or groups that need to switch in )
1580  mask等于CPUs or groups that need to switch in 按位与ginning of each grace period. 的反
1581  Mask of offline CPUs at GP init. 等于mask
1582  如果maskNecessary to wait for blocked tasks to 的值且Is this rcu_node a leaf? (rnp)则Similar to rcu_report_qs_rdp(), for which it is a helper function
1584  否则raw_spin_unlock_irq_rcu_node(rnp)
1586  cond_resched_tasks_rcu_qs - Report potential quiescent states to RCU* This macro resembles cond_resched(), except that it is defined to* report potential quiescent states to RCU-tasks even if the cond_resched()()
1587  WRITE_ONCE(Time of last GP kthread , jiffies)
1590  返回:true
调用者
名称描述
rcu_gp_kthreadBody of kthread that handles grace periods.