Function report |
Source Code:kernel\rcu\rcuperf.c |
Create Date:2022-07-28 10:23:59 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:rcu_perf_init
Proto:static int __init rcu_perf_init(void)
Type:int
Parameter:Nothing
| 591 | firsterr = 0 |
| 596 | If Not Initialize torture module Then Return -EBUSY |
| 607 | pr_alert("rcu-perf types:") |
| 611 | WARN_ON(!IS_MODULE(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'm', 0* otherwise.(CONFIG_RCU_PERF_TEST)) |
| 613 | cur_ops = NULL |
| 614 | Go to unwind |
| 619 | nrealwriters = Return the number if non-negative. If -1, the number of CPUs.* If less than -1, that much less than the number of CPUs, but* at least one. |
| 620 | nrealreaders = Return the number if non-negative. If -1, the number of CPUs.* If less than -1, that much less than the number of CPUs, but* at least one. |
| 621 | atomic_set( & n_rcu_perf_reader_started, 0) |
| 622 | atomic_set( & n_rcu_perf_writer_started, 0) |
| 623 | atomic_set( & n_rcu_perf_writer_finished, 0) |
| 624 | rcu_perf_print_module_parms(cur_ops, "Start of test") |
| 628 | If shutdown Then |
| 629 | init_waitqueue_head( & shutdown_wq) |
| 636 | reader_tasks = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). |
| 638 | If (reader_tasks == NULL) Then |
| 643 | When i < nrealreaders cycle |
| 649 | When atomic_read( & n_rcu_perf_reader_started) < nrealreaders cycle |
| 651 | writer_tasks = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). |
| 653 | writer_durations = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). |
| 655 | writer_n_durations = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). |
| 658 | If Not writer_tasks || Not writer_durations || Not writer_n_durations Then |
| 663 | When i < nrealwriters cycle |
| 664 | writer_durations[i] = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). |
| 667 | If Not writer_durations[i] Then |
| 677 | Return 0 |
| 679 | unwind : |
| 681 | rcu_perf_cleanup() |
| 682 | Return firsterr |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |