函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Carry out need_resched()/cond_resched() forward-progress testing.

函数原型:static void rcu_torture_fwd_prog_nr(int *tested, int *tested_tries)

返回类型:void

参数:

类型参数名称
int *tested
int *tested_tries
1786  bool selfpropcb = false
1788  static
1790  如果callsynccb_barrier
1791  init_rcu_head_on_stack( & rh)
1792  selfpropcb = true
1796  WRITE_ONCE(Short rcu_torture_delay() delays. , true)
1797  sync()
1798  如果selfpropcb
1799  WRITE_ONCE(stop, 0)
1800  call( & rh, Forward-progress self-propagating RCU callback function. Because* callbacks run from softirq, this function is an implicit RCU read-side* critical section.)
1802  cver等于READ_ONCE(rcu_torture_current_version)
1803  gps等于get_gp_seq()
1804  sd等于stall_dur()加1
1805  sd4等于sdfwd_progress_div减1的差除fwd_progress_div
1806  dur等于sd4torture_random( & trs)取模sdsd4的差
1807  WRITE_ONCE(rcu_fwd_startat, jiffies)
1808  stopat等于rcu_fwd_startatdur
1809 time_before(jiffies, stopat)且非Stop aggressive CPU-hog tests a bit before the end of the test in order* to avoid interfering with test shutdown.且非READ_ONCE(rcu_fwd_emergency_stop)且非Is it time for the current torture test to stop?循环
1812  idx等于readlock()
1813  0x10c7 is 2**32 / 1000000 (rounded up) (10)
1814  readunlock(idx)
1815  如果非fwd_progress_need_reschedneed_resched()则cond_resched()
1818  tested_tries自加
1819  如果非time_before(jiffies, stopat)且非Stop aggressive CPU-hog tests a bit before the end of the test in order* to avoid interfering with test shutdown.且非READ_ONCE(rcu_fwd_emergency_stop)且非Is it time for the current torture test to stop?
1822  tested自加
1823  cver等于READ_ONCE(rcu_torture_current_version)减cver
1824  gps等于rcutorture_seq_diff(get_gp_seq(), gps)
1825  WARN_ON(!cver && gps < 2)
1826  打印警报信息("%s: Duration %ld cver %ld gps %ld\n", __func__, dur, cver, gps)
1828  如果selfpropcb
1829  WRITE_ONCE(stop, 1)
1830  sync()
1831  cb_barrier()
1834  如果selfpropcb
1835  WARN_ON(READ_ONCE(stop) != 2)
1836  destroy_rcu_head_on_stack( & rh)
1838  schedule_timeout_uninterruptible(HZ / 10)
1839  WRITE_ONCE(Short rcu_torture_delay() delays. , false)
调用者
名称描述
rcu_torture_fwd_progCarry out grace-period forward-progress testing.