函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mem_cgroup_usage

函数原型:static unsigned long mem_cgroup_usage(struct mem_cgroup *memcg, bool swap)

返回类型:unsigned long

参数:

类型参数名称
struct mem_cgroup *memcg
boolswap
3227  如果mem_cgroup_is_root(memcg)则
3228  val等于dx can be of type enum memcg_stat_item or node_stat_item.* Keep in sync with memcg_exact_page_state().dx can be of type enum memcg_stat_item or node_stat_item.* Keep in sync with memcg_exact_page_state().
3230  如果swapval加等于dx can be of type enum memcg_stat_item or node_stat_item.* Keep in sync with memcg_exact_page_state().
3232  否则
3233  如果非swapval等于page_counter_read( & Accounted resources )
3235  否则val等于page_counter_read( & Legacy consumer-oriented counters )
3238  返回:val
调用者
名称描述
mem_cgroup_read_u64
__mem_cgroup_threshold
__mem_cgroup_usage_register_event
__mem_cgroup_usage_unregister_event