Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memcontrol.c Create Date:2022-07-28 16:11:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__mem_cgroup_threshold

Proto:static void __mem_cgroup_threshold(struct mem_cgroup *memcg, bool swap)

Type:void

Parameter:

TypeParameterName
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  If Not swap Then t = fetch RCU-protected pointer for dereferencing(primary)
3843  Else t = fetch RCU-protected pointer for dereferencing( Primary thresholds array )
3846  If Not t Then Go to unlock
3849  usage = mem_cgroup_usage(memcg, swap)
3856  i = An array index points to threshold just below or equal to usage.
3864  When i >= 0 && Value for the false possibility is greater at compile time(threshold > usage) cycle eventfd_signal(eventfd, 1)
3868  i++
3876  When i < Size of entries[] && Value for the false possibility is greater at compile time(threshold <= usage) cycle 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()
Caller
NameDescribe
mem_cgroup_threshold
__mem_cgroup_usage_register_event
__mem_cgroup_usage_unregister_event