Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Clean up after the old grace period.

Proto:static void rcu_gp_cleanup(void)

Type:void

Parameter:Nothing

1709  bool needgp = false
1713  rnp = Return the root node of the rcu_state structure.
1716  WRITE_ONCE(Time of last GP kthread , jiffies)
1717  raw_spin_lock_irq_rcu_node(rnp)
1718  Time last GP ended, again = jiffies
1719  gp_duration = Time last GP ended, again - Time at which GP started,
1720  If gp_duration > Maximum GP duration in Then Maximum GP duration in = gp_duration
1731  raw_spin_unlock_irq_rcu_node(rnp)
1742  new_gp_seq = Grace-period sequence #.
1743  Adjust sequence number for end of update-side operation.
1744  rcu_for_each_node_breadth_first(rnp)
1745  raw_spin_lock_irq_rcu_node(rnp)
1746  If WARN_ON_ONCE(rcu_preempt_blocked_readers_cgp(rnp)) Then dump_blkd_tasks(rnp, 10)
1748  WARN_ON_ONCE(CPUs or groups that need to switch in )
1749  WRITE_ONCE(Track rsp->rcu_gp_seq. , new_gp_seq)
1750  rdp = this_cpu_ptr( & rcu_data)
1751  If rnp == This CPU's leaf of hierarchy Then needgp = 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. || needgp
1754  needgp = Clean up any old requests for the just-ended grace period. Also return* whether any additional grace periods have been requested. || needgp
1755  sq = rcu_nocb_gp_get(rnp)
1756  raw_spin_unlock_irq_rcu_node(rnp)
1757  rcu_nocb_gp_cleanup(sq)
1758  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()()
1759  WRITE_ONCE(Time of last GP kthread , jiffies)
1760  rcu_gp_slow(gp_cleanup_delay)
1762  rnp = Return the root node of the rcu_state structure.
1763  raw_spin_lock_irq_rcu_node(rnp)
1766  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.("end"))
1767  Adjust sequence number for end of update-side operation.
1768  GP kthread sleep state. = Initial state and no GP in progress.
1770  rdp = this_cpu_ptr( & rcu_data)
1771  If Not needgp && ULONG_CMP_LT(Track rsp->rcu_gp_seq. , Track furthest future GP request. ) Then
1772  Trace-event wrapper function for trace_rcu_future_grace_period.
1774  needgp = true
1777  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?
1779  If (offloaded || Not If there is room, assign a ->gp_seq number to any callbacks on this* CPU that have not already been assigned ) && needgp Then
1780  WRITE_ONCE(Commands for GP task. , Need grace-period initialization. )
1781  Time of last GP request = jiffies
1782  trace_rcu_grace_period(Name of structure. , READ_ONCE(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.("newreq"))
1785  Else
1786  WRITE_ONCE(Commands for GP task. , Commands for GP task. & Need grace-period initialization. )
1789  raw_spin_unlock_irq_rcu_node(rnp)
Caller
NameDescribe
rcu_gp_kthreadBody of kthread that handles grace periods.