函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\rcu\tree.c Create Date:2022-07-27 11:27:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Helper function for call_rcu() and friends. The cpu argument will* normally be -1, indicating "currently running CPU". It may specify* a CPU only if that CPU is a no-CBs CPU. Currently, only rcu_barrier()* is expected to specify a CPU.

函数原型:static void __call_rcu(struct callback_head *head, rcu_callback_t func, bool lazy)

返回类型:void

参数:

类型参数名称
struct callback_head *head
rcu_callback_tfunc
boollazy
2594  WARN_ON_ONCE((unsignedlong)head & (*的长度 - 1))
2596  如果debug_rcu_head_queue()/debug_rcu_head_unqueue() are used internally* by call_rcu() and rcu callback execution, and are therefore not part* of the RCU API. These are in rcupdate.h because they are used by all* RCU implementations.
2602  WARN_ONCE(1, "__call_rcu(): Double-freed CB %p->%pS()!!!\n", head, func)
2604  WRITE_ONCE(func, RCU callback function to leak a callback.)
2605  返回
2607  func等于func
2608  next = NULL
2609  local_irq_save(flags)
2610  rdp等于this_cpu_ptr( & rcu_data)
2613  如果此条件成立可能性小(为编译器优化)(!Is the specified rcu_segcblist enabled, for example, not corresponding* to an offline CPU?)则
2615  WARN_ON_ONCE(The rcu_scheduler_active variable is initialized to the value* RCU_SCHEDULER_INACTIVE and transitions RCU_SCHEDULER_INIT just before the* first task is spawned != RCU_SCHEDULER_INACTIVE)
2616  WARN_ON_ONCE(!_is_watching - see if RCU thinks that the current CPU is not idle* Return true if RCU is watching the running CPU, which means that this* CPU can safely enter RCU read-side critical sections)
2619  如果Is the specified rcu_segcblist structure empty?* But careful! The fact that the ->head field is NULL does not* necessarily imply that there are no callbacks associated with* this structure. When callbacks are being invoked, they are* removed as a grouprcu_segcblist_init( & Segmented callback list, with )
2622  如果rcu_nocb_try_bypass(rdp, head, & was_alldone, flags)则返回
2625  rcu_segcblist_enqueue( & Segmented callback list, with , head, lazy)
2626  如果Does the specified offset indicate that the corresponding rcu_head* structure can be handled by kfree_rcu()?((unsignedlong)func)则Tracepoint for the registration of a single RCU callback of the special* kfree() form
2631  否则Tracepoint for the registration of a single RCU callback function
2637  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_RCU_NOCB_CPU)且此条件成立可能性小(为编译器优化)(Is the specified rcu_segcblist offloaded? )则
2639  __call_rcu_nocb_wake(rdp, was_alldone, flags)
2640  否则
2641  Handle any core-RCU processing required by a call_rcu() invocation.
2642  local_irq_restore(flags)
调用者
名称描述
call_rcuall_rcu() - Queue an RCU callback for invocation after a grace period
kfree_call_rcuQueue an RCU callback for lazy invocation after a grace period.* This will likely be later named something like "call_rcu_lazy()",* but this change will require some way of tagging the lazy RCU* callbacks in the list of pending callbacks. Until then, this