函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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
注解内核,赢得工具下载SCCTEnglish

函数名称:RCU perf writer kthread. Repeatedly does a grace period.

函数原型:static int rcu_perf_writer(void *arg)

返回类型:int

参数:

类型参数名称
void *arg
350  i等于0
352  me等于arg
353  struct callback_head * rhp = NULL
355  bool started = TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., done = TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., alldone = false
358  wdpp等于writer_durations[me]
360  VERBOSE_PERFOUT_STRING("rcu_perf_writer task started")
361  WARN_ON(!wdpp)
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  如果holdoffschedule_timeout_uninterruptible(holdoff * HZ)
374  当非gp_expValues used for system_state. Ordering of the states must not be changed* as code checks for <, <=, >, >= STATE.不等于SYSTEM_RUNNING循环
375  schedule_timeout_uninterruptible(1)
377  t等于ktime_get_mono_fast_ns()
378  如果atomic_inc_return( & n_rcu_perf_writer_started)大于等于nrealwriters
379  t_rcu_perf_writer_started等于t
380  如果gp_exp
383  否则
388  循环
389  如果writer_holdoff0x10c7 is 2**32 / 1000000 (rounded up) (writer_holdoff)
391  wdp等于wdpp[i]
392  wdp等于ktime_get_mono_fast_ns()
393  如果gp_async
394  retry :
395  如果非rhprhp等于开辟内存
402  gp_barrier()
403  转到:retry
404  否则
405  kfree(rhp)
407  否则如果gp_exp
408  exp_sync()
409  否则
410  sync()
412  t等于ktime_get_mono_fast_ns()
413  wdp等于twdp
414  i_max等于i
415  如果非startedatomic_read( & n_rcu_perf_writer_started)大于等于nrealwritersstarted = true
418  如果非donei大于等于MIN_MEAS
419  done = true
420  sched_priority等于0
423  打印警报信息("%s%s rcu_perf_writer %ld has %d measurements\n", perf_type, PERF_FLAG, me, MIN_MEAS)
444  如果done且非alldoneatomic_read( & n_rcu_perf_writer_finished)大于等于nrealwritersalldone = true
447  如果started且非alldonei小于MAX_MEAS减1则i自加
449  If performance tests complete, wait for shutdown to commence.
450  当非Is it time for the current torture test to stop?循环
451  如果gp_async
452  gp_barrier()
454  writer_n_durations[me]等于i_max
455  Each kthread must wait for kthread_should_stop() before returning from* its top-level function, otherwise segfaults ensue
456  返回:0