Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memcontrol.c Create Date:2022-07-28 16:09:21
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_page: Obtain a reference on given page's memcg.*@page: page from which memcg should be extracted.* Obtain a reference on page->memcg and returns it if successful. Otherwise* root_mem_cgroup is returned.

Proto:struct mem_cgroup *get_mem_cgroup_from_page(struct page *page)

Type:struct mem_cgroup

Parameter:

TypeParameterName
struct page *page
959  memcg = mem_cgroup
961  If mem_cgroup_disabled() Then Return NULL
964  _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
965  If Not memcg || Not 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 = root_mem_cgroup
967  _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()
968  Return memcg