函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:page_counter_set_max - set the maximum number of pages allowed*@counter: counter*@nr_pages: limit to set* Returns 0 on success, -EBUSY if the current number of pages on the* counter already exceeds the specified limit.

函数原型:int page_counter_set_max(struct page_counter *counter, unsigned long nr_pages)

返回类型:int

参数:

类型参数名称
struct page_counter *counter
unsigned longnr_pages
175  循环
190  usage等于atomic_long_read( & usage)
192  如果usage大于nr_pages则返回:负EBUSY
195  old等于xchg( & max, nr_pages)
197  如果atomic_long_read( & usage)小于等于usage则返回:0
200  max等于old
201  cond_resched()
调用者
名称描述
mem_cgroup_resize_max
memcg_update_kmem_max
memcg_update_tcp_max
mem_cgroup_css_resetmem_cgroup_css_reset - reset the states of a mem_cgroup*@css: the target css* Reset the states of the mem_cgroup associated with @css. This is* invoked when the userland requests disabling on the default hierarchy
hugetlb_cgroup_init
hugetlb_cgroup_write