函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__mem_cgroup_threshold

函数原型:static void __mem_cgroup_threshold(struct mem_cgroup *memcg, bool swap)

返回类型:void

参数:

类型参数名称
struct mem_cgroup *memcg
boolswap
3840  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
3841  如果非swapt等于cu_dereference() - fetch RCU-protected pointer for dereferencing*@p: The pointer to read, prior to dereferencing* This is a simple wrapper around rcu_dereference_check().(primary)
3843  否则t等于cu_dereference() - fetch RCU-protected pointer for dereferencing*@p: The pointer to read, prior to dereferencing* This is a simple wrapper around rcu_dereference_check().( Primary thresholds array )
3846  如果非t则转到:unlock
3849  usage等于mem_cgroup_usage(memcg, swap)
3856  i等于An array index points to threshold just below or equal to usage.
3864 i大于等于0且此条件成立可能性小(为编译器优化)(threshold > usage)循环eventfd_signal(eventfd, 1)
3868  i自加
3876 i小于Size of entries[] 此条件成立可能性小(为编译器优化)(threshold <= usage)循环eventfd_signal(eventfd, 1)
3880  An array index points to threshold just below or equal to usage. 等于i减1
3881  unlock :
3882  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
调用者
名称描述
mem_cgroup_threshold
__mem_cgroup_usage_register_event
__mem_cgroup_usage_unregister_event