函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mem_cgroup_margin - calculate chargeable space of a memory cgroup*@memcg: the memory cgroup* Returns the maximum amount of memory @mem can be charged with, in* pages.

函数原型:static unsigned long mem_cgroup_margin(struct mem_cgroup *memcg)

返回类型:unsigned long

参数:

类型参数名称
struct mem_cgroup *memcg
1291  margin等于0
1295  count等于page_counter_read( & Accounted resources )
1296  limit等于READ_ONCE(max)
1297  如果count小于limitmargin等于limitcount
1300  如果Whether legacy memory+swap accounting is active
1301  count等于page_counter_read( & Legacy consumer-oriented counters )
1302  limit等于READ_ONCE(max)
1303  如果count小于等于limitmargin等于两数取小(margin, limit - count)
1305  否则margin等于0
1309  返回:margin
调用者
名称描述
try_charge