函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:rcu_torture_cleanup

函数原型:static void rcu_torture_cleanup(void)

返回类型:void

参数:

2183  flags等于0
2184  gp_seq等于0
2187  如果Clean up torture module
2188  如果(cb_barrier != NULL)则cb_barrier()
2190  返回
2192  如果非cur_ops
2193  torture_cleanup_end()
2194  返回
2197  Show the state of the grace-period kthreads.
2198  Clean up after RCU barrier testing.
2199  torture_stop_kthread(Carry out grace-period forward-progress testing. , fwd_prog_task)
2200  torture_stop_kthread(CPU-stall kthread. It waits as specified by stall_cpu_holdoff, then* induces a CPU stall for the time specified by stall_cpu., stall_task)
2201  torture_stop_kthread(RCU torture writer kthread. Repeatedly substitutes a new structure* for that pointed to by rcu_torture_current, freeing the old structure* after a series of grace periods (the "pipeline")., writer_task)
2203  如果reader_tasks
2204 i小于nrealreaders循环torture_stop_kthread(RCU torture reader kthread. Repeatedly dereferences rcu_torture_current,* incrementing the corresponding element of the pipeline array. The* counter in the element should never be greater than 1, otherwise, the* RCU implementation is broken., reader_tasks[i])
2207  kfree(reader_tasks)
2209  rcu_torture_current = NULL
2211  如果fakewriter_tasks
2212 i小于nfakewriters循环
2216  kfree(fakewriter_tasks)
2217  fakewriter_tasks = NULL
2220  Send along grace-period-related data for rcutorture diagnostics.
2221  srcutorture_get_gp_data(ttype, srcu_ctlp, & flags, & gp_seq)
2222  打印警报信息("%s: End-test grace-period state: g%lu f%#x\n", name, gp_seq, flags)
2224  torture_stop_kthread(Periodically prints torture statistics, if periodic statistics printing* was specified via the stat_interval module parameter., stats_task)
2225  torture_stop_kthread(RCU torture force-quiescent-state kthread. Repeatedly induces* bursts of calls to force_quiescent_state(), increasing the probability* of occurrence of some important types of race conditions., fqs_task)
2226  如果rcu_torture_can_boost()则puhp_remove_state - Remove hotplug state callbacks and invoke the teardown*@state: The state for which the calls are removed* Removes the callback functions and invokes the teardown callback on* the present cpus which have already reached the @state.
2233  如果(cb_barrier != NULL)则cb_barrier()
2235  如果(cleanup != NULL)则cleanup()
2238  Print torture statistics
2240  如果err_segs_recorded
2241  打印警报信息("Failure/close-call rcutorture reader segments:\n")
2242  如果rt_read_nsegs恒等于0则打印警报信息("\t: No segments recorded!!!\n")
2244  firsttime等于1
2245 i小于rt_read_nsegs循环
2246  打印警报信息("\t%d: %#x ", i, rt_readstate)
2247  如果rt_delay_jiffies不等于0则
2248  打印标准信息("%s%ldjiffies", firsttime ? "" : "+", rt_delay_jiffies)
2250  firsttime等于0
2252  如果rt_delay_ms不等于0则
2253  打印标准信息("%s%ldms", firsttime ? "" : "+", rt_delay_ms)
2255  firsttime等于0
2257  如果rt_delay_us不等于0则
2258  打印标准信息("%s%ldus", firsttime ? "" : "+", rt_delay_us)
2260  firsttime等于0
2262  打印标准信息("%s\n", rt_preempted ? "preempted" : "")
2267  如果atomic_read( & n_rcu_torture_error)或n_rcu_torture_barrier_errorrcu_torture_print_module_parms(cur_ops, "End of test: FAILURE")
2269  否则如果torture_onoff_failures()则rcu_torture_print_module_parms(cur_ops, "End of test: RCU_HOTPLUG")
2272  否则rcu_torture_print_module_parms(cur_ops, "End of test: SUCCESS")
2274  torture_cleanup_end()
调用者
名称描述
rcu_torture_init