函数逻辑报告 |
Source Code:kernel\rcu\rcuperf.c |
Create Date:2022-07-27 11:24:07 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:RCU perf writer kthread. Repeatedly does a grace period.
函数原型:static int rcu_perf_writer(void *arg)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
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(当前进程, cpumask_of - the cpumask containing just a given cpu*@cpu: the cpu (<= nr_cpu_ids)(me % nr_cpu_ids)) |
363 | sched_priority等于1 |
364 | 改变调度策略和线程优先级 |
366 | 如果holdoff则schedule_timeout_uninterruptible(holdoff * HZ) |
374 | 当非gp_exp且Values used for system_state. Ordering of the states must not be changed* as code checks for <, <=, >, >= STATE.不等于SYSTEM_RUNNING循环 |
377 | t等于ktime_get_mono_fast_ns() |
378 | 如果atomic_inc_return( & n_rcu_perf_writer_started)大于等于nrealwriters则 |
388 | 循环 |
392 | wdp等于ktime_get_mono_fast_ns() |
393 | 如果gp_async则 |
394 | retry : |
397 | 如果rhp且atomic_read(this_cpu_ptr( & n_async_inflight))小于gp_async_max则 |
398 | atomic_inc(this_cpu_ptr( & n_async_inflight)) |
400 | rhp = NULL |
402 | gp_barrier() |
403 | 转到:retry |
404 | 否则 |
407 | 否则如果gp_exp则 |
408 | exp_sync() |
409 | 否则 |
410 | sync() |
412 | t等于ktime_get_mono_fast_ns() |
415 | 如果非started且atomic_read( & n_rcu_perf_writer_started)大于等于nrealwriters则started = true |
419 | done = true |
420 | sched_priority等于0 |
421 | 改变调度策略和线程优先级 |
425 | 如果atomic_inc_return( & n_rcu_perf_writer_finished)大于等于nrealwriters则 |
427 | schedule_timeout_interruptible(10) |
429 | PERFOUT_STRING("Test complete") |
431 | 如果gp_exp则 |
432 | b_rcu_perf_writer_finished等于exp_completed()除2 |
434 | 否则 |
438 | 如果shutdown则 |
439 | smp_mb() |
440 | wake_up( & shutdown_wq) |
444 | 如果done且非alldone且atomic_read( & n_rcu_perf_writer_finished)大于等于nrealwriters则alldone = true |
451 | 如果gp_async则 |
452 | gp_barrier() |
454 | writer_n_durations[me]等于i_max |
456 | 返回:0 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |