Function report |
Source Code:kernel\rcu\rcuperf.c |
Create Date:2022-07-28 10:23:47 |
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 writer kthread. Repeatedly does a grace period.
Proto:static int rcu_perf_writer(void *arg)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
void * | arg |
350 | i = 0 |
353 | struct callback_head * rhp = NULL |
358 | wdpp = writer_durations[me] |
360 | VERBOSE_PERFOUT_STRING("rcu_perf_writer task started") |
362 | set_cpus_allowed_ptr(current process, cpumask_of - the cpumask containing just a given cpu*@cpu: the cpu (<= nr_cpu_ids)(me % nr_cpu_ids)) |
363 | sched_priority = 1 |
366 | If holdoff Then schedule_timeout_uninterruptible(holdoff * HZ) |
374 | When Not gp_exp && Values used for system_state. Ordering of the states must not be changed* as code checks for <, <=, >, >= STATE. != SYSTEM_RUNNING cycle |
377 | t = ktime_get_mono_fast_ns() |
378 | If atomic_inc_return( & n_rcu_perf_writer_started) >= nrealwriters Then |
379 | t_rcu_perf_writer_started = t |
380 | If gp_exp Then |
381 | b_rcu_perf_writer_started = exp_completed() / 2 |
383 | Else |
384 | b_rcu_perf_writer_started = get_gp_seq() |
388 | Do |
392 | wdp = ktime_get_mono_fast_ns() |
393 | If gp_async Then |
394 | retry : |
395 | If Not rhp Then rhp = Allocation memory |
397 | If rhp && atomic_read(this_cpu_ptr( & n_async_inflight)) < gp_async_max Then |
398 | atomic_inc(this_cpu_ptr( & n_async_inflight)) |
400 | rhp = NULL |
402 | gp_barrier() |
403 | Go to retry |
404 | Else |
407 | Else if gp_exp Then |
408 | exp_sync() |
409 | Else |
410 | sync() |
412 | t = ktime_get_mono_fast_ns() |
415 | If Not started && atomic_read( & n_rcu_perf_writer_started) >= nrealwriters Then started = true |
419 | done = true |
420 | sched_priority = 0 |
425 | If atomic_inc_return( & n_rcu_perf_writer_finished) >= nrealwriters Then |
427 | schedule_timeout_interruptible(10) |
429 | PERFOUT_STRING("Test complete") |
430 | t_rcu_perf_writer_finished = t |
431 | If gp_exp Then |
432 | b_rcu_perf_writer_finished = exp_completed() / 2 |
434 | Else |
435 | b_rcu_perf_writer_finished = get_gp_seq() |
438 | If shutdown Then |
439 | smp_mb() |
440 | wake_up( & shutdown_wq) |
444 | If done && Not alldone && atomic_read( & n_rcu_perf_writer_finished) >= nrealwriters Then alldone = true |
450 | When Not Is it time for the current torture test to stop? cycle |
451 | If gp_async Then |
452 | gp_barrier() |
454 | writer_n_durations[me] = i_max |
456 | Return 0 |
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 |