Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:rcu_torture_cleanup

Proto:static void rcu_torture_cleanup(void)

Type:void

Parameter:Nothing

2183  flags = 0
2184  gp_seq = 0
2187  If Clean up torture module Then
2188  If (cb_barrier != NULL) Then cb_barrier()
2190  Return
2192  If Not cur_ops Then
2193  torture_cleanup_end()
2194  Return
2197  show_rcu_gp_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  If reader_tasks Then
2204  When i < nrealreaders cycle 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  If fakewriter_tasks Then
2212  When i < nfakewriters cycle
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  pr_alert("%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  If rcu_torture_can_boost() Then 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  If (cb_barrier != NULL) Then cb_barrier()
2235  If (cleanup != NULL) Then cleanup()
2238  Print torture statistics
2240  If err_segs_recorded Then
2241  pr_alert("Failure/close-call rcutorture reader segments:\n")
2242  If rt_read_nsegs == 0 Then pr_alert("\t: No segments recorded!!!\n")
2244  firsttime = 1
2245  When i < rt_read_nsegs cycle
2246  pr_alert("\t%d: %#x ", i, rt_readstate)
2247  If rt_delay_jiffies != 0 Then
2252  If rt_delay_ms != 0 Then
2257  If rt_delay_us != 0 Then
2267  If atomic_read( & n_rcu_torture_error) || n_rcu_torture_barrier_error Then rcu_torture_print_module_parms(cur_ops, "End of test: FAILURE")
2269  Else if torture_onoff_failures() Then rcu_torture_print_module_parms(cur_ops, "End of test: RCU_HOTPLUG")
2272  Else rcu_torture_print_module_parms(cur_ops, "End of test: SUCCESS")
2274  torture_cleanup_end()
Caller
NameDescribe
rcu_torture_init