函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:If current->active_memcg is non-NULL, do not fallback to current->mm->memcg.

函数原型:static __always_inline struct mem_cgroup *get_mem_cgroup_from_current(void)

返回类型:struct mem_cgroup

参数:

977  如果此条件成立可能性小(为编译器优化)(active_memcg)则
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  如果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 onlinememcg等于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  返回:memcg
986  返回: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