Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:If current->active_memcg is non-NULL, do not fallback to current->mm->memcg.

Proto:static __always_inline struct mem_cgroup *get_mem_cgroup_from_current(void)

Type:struct mem_cgroup

Parameter:Nothing

977  If Value for the false possibility is greater at compile time(active_memcg) Then
978  memcg = root_mem_cgroup
980  _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
981  If ss_tryget_online - try to obtain a reference on the specified css if online*@css: target css* Obtain a reference on @css if it's online Then memcg = active_memcg
983  _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()
984  Return memcg
986  Return get_mem_cgroup_from_mm: Obtain a reference on given mm_struct's memcg.*@mm: mm from which memcg should be extracted. It can be NULL.* Obtain a reference on mm->memcg and returns it if successful. Otherwise* root_mem_cgroup is returned