函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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.

函数原型:struct mem_cgroup *get_mem_cgroup_from_page(struct page *page)

返回类型:struct mem_cgroup

参数:

类型参数名称
struct page *page
959  memcg等于mem_cgroup
961  如果mem_cgroup_disabled()则返回: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  如果非memcg或非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等于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  返回:memcg
调用者
名称描述
alloc_page_buffersCreate the appropriate buffers when given a page for data area and* the size of each buffer