函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Compute the rcu_node tree geometry from kernel parameters. This cannot* replace the definitions in tree.h because those are needed to size* the ->node array in the rcu_state structure.

函数原型:static void __init rcu_init_geometry(void)

返回类型:void

参数:

3474  d等于RCU_JIFFIES_TILL_FORCE_QSnr_cpu_idsVery large systems need more
3475  如果jiffies_till_first_fqs恒等于ULONG_MAXjiffies_till_first_fqs等于d
3477  如果jiffies_till_next_fqs恒等于ULONG_MAXjiffies_till_next_fqs等于d
3479  Make sure that we give the grace-period kthread time to detect any* idle CPUs before taking active measures to force quiescent states.* However, don't go below 100 milliseconds, adjusted upwards for really* large systems.
3482  如果Increase (but not decrease) the RCU_FANOUT_LEAF at boot time. 恒等于RCU_FANOUT_LEAFnr_cpu_ids恒等于CPU数量则返回
3485  打印信息("Adjusting geometry for rcu_fanout_leaf=%d, nr_cpu_ids=%u\n", Increase (but not decrease) the RCU_FANOUT_LEAF at boot time. , nr_cpu_ids)
3494  如果Increase (but not decrease) the RCU_FANOUT_LEAF at boot time. 小于2或Increase (but not decrease) the RCU_FANOUT_LEAF at boot time. 大于sizeof(unsignedlong)乘8则
3496  Increase (but not decrease) the RCU_FANOUT_LEAF at boot time. 等于RCU_FANOUT_LEAF
3497  WARN_ON(1)
3498  返回
3505  rcu_capacity[0]等于Increase (but not decrease) the RCU_FANOUT_LEAF at boot time.
3506 i小于RCU_NUM_LVLS循环rcu_capacity[i]等于rcu_capacity[i - 1]乘RCU_FANOUT
3513  如果nr_cpu_ids大于rcu_capacity[RCU_NUM_LVLS - 1]则
3514  Increase (but not decrease) the RCU_FANOUT_LEAF at boot time. 等于RCU_FANOUT_LEAF
3515  WARN_ON(1)
3516  返回
3520 nr_cpu_ids大于rcu_capacity[i]循环rcu_num_lvls等于i加1
3525 i小于rcu_num_lvls循环
3526  cap等于rcu_capacity[(rcu_num_lvls - 1) - i]
3527  Number of rcu_nodes at specified level. [i]等于DIV_ROUND_UP(nr_cpu_ids, cap)
3531  rcu_num_nodes等于0
3532 i小于rcu_num_lvls循环rcu_num_nodes加等于Number of rcu_nodes at specified level. [i]
调用者
名称描述
rcu_init初始化直接读拷贝更新的锁机制