Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:struct mem_cgroup *get_mem_cgroup_from_mm(struct mm_struct *mm)

Type:struct mem_cgroup

Parameter:

TypeParameterName
struct mm_struct *mm
927  If mem_cgroup_disabled() Then Return NULL
930  _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
931  Do
937  If Value for the false possibility is greater at compile time(!mm) Then memcg = root_mem_cgroup
939  Else
944  When Not ss_tryget - try to obtain a reference on the specified css*@css: target css* Obtain a reference on @css unless it already has reached zero and is* being released. This function doesn't care whether @css is on or* offline cycle
945  _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()
946  Return memcg
Caller
NameDescribe
get_mem_cgroup_from_currentIf current->active_memcg is non-NULL, do not fallback to current->mm->memcg.
mem_cgroup_handle_over_highScheduled by try_charge() to be executed from the userland return path* and reclaims memory over the high limit.
mem_cgroup_try_chargemem_cgroup_try_charge - try charging a page*@page: page to charge*@mm: mm context of the victim*@gfp_mask: reclaim mode*@memcgp: charged memcg return*@compound: charge the page as compound or small page* Try to charge @page to the memcg that @mm belongs
SYSCALL_DEFINE2anotify syscalls