Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Carry out call_rcu() forward-progress testing.

Proto:static void rcu_torture_fwd_prog_cr(void)

Type:void

Parameter:Nothing

1859  If READ_ONCE(rcu_fwd_emergency_stop) Then Return
1861  If Not call Then Return
1865  WRITE_ONCE(Short rcu_torture_delay() delays. , true)
1866  sync()
1867  WRITE_ONCE(rcu_fwd_startat, jiffies)
1868  stopat = rcu_fwd_startat + Maximum CB test duration.
1869  n_launders = 0
1870  n_launders_cb = 0
1871  n_launders_sa = 0
1872  n_max_cbs = 0
1873  n_max_gps = 0
1874  When i < ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(n_launders_hist) cycle n_launders = 0
1876  cver = READ_ONCE(rcu_torture_current_version)
1877  gps = get_gp_seq()
1878  rcu_launder_gp_seq_start = gps
1879  tick_dep_set_task(current process, TICK_DEP_BIT_RCU)
1880  When time_before(jiffies, stopat) && Not Stop aggressive CPU-hog tests a bit before the end of the test in order* to avoid interfering with test shutdown. && Not READ_ONCE(rcu_fwd_emergency_stop) && Not Is it time for the current torture test to stop? cycle
1883  rfcp = READ_ONCE(rcu_fwd_cb_head)
1884  rfcpn = NULL
1885  If rfcp Then rfcpn = READ_ONCE(rfc_next)
1887  If rfcpn Then
1892  n_launders++
1893  n_launders_sa++
1894  Else
1896  If WARN_ON_ONCE(!rfcp) Then
1898  Continue
1900  n_max_cbs++
1901  n_launders_sa = 0
1902  rfc_gps = 0
1904  call( & rh, Callback function for continuous-flood RCU callbacks. )
1905  Give the scheduler a chance, even on nohz_full CPUs.
1906  If tick_nohz_full_enabled() Then
1912  stoppedat = jiffies
1913  n_launders_cb_snap = READ_ONCE(n_launders_cb)
1914  cver = READ_ONCE(rcu_torture_current_version) - cver
1915  gps = rcutorture_seq_diff(get_gp_seq(), gps)
1916  cb_barrier()
1917  Free all callbacks on the rcu_fwd_cb_head list, either because the* test is over or because we hit an OOM event.
1919  If Not Is it time for the current torture test to stop? && Not READ_ONCE(rcu_fwd_emergency_stop) && Not Stop aggressive CPU-hog tests a bit before the end of the test in order* to avoid interfering with test shutdown. Then
1921  WARN_ON(n_max_gps < Number of counted CBs. )
1922  pr_alert("%s Duration %lu barrier: %lu pending %ld n_launders: %ld n_launders_sa: %ld n_max_gps: %ld n_max_cbs: %ld cver %ld gps %ld\n", __func__, stoppedat - rcu_fwd_startat, jiffies - stoppedat, n_launders + n_max_cbs - n_launders_cb_snap, n_launders, n_launders_sa, n_max_gps, n_max_cbs, cver, gps)
1928  rcu_torture_fwd_cb_hist()
1930  schedule_timeout_uninterruptible(HZ)
1931  tick_dep_clear_task(current process, TICK_DEP_BIT_RCU)
1932  WRITE_ONCE(Short rcu_torture_delay() delays. , false)
Caller
NameDescribe
rcu_torture_fwd_progCarry out grace-period forward-progress testing.