函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Cache charges(val) to local per_cpu area.* This will be consumed by consume_stock() function, later.

函数原型:static void refill_stock(struct mem_cgroup *memcg, unsigned int nr_pages)

返回类型:void

参数:

类型参数名称
struct mem_cgroup *memcg
unsigned intnr_pages
2121  local_irq_save(flags)
2123  stock等于this_cpu_ptr( & memcg_stock)
2124  如果 this never be root cgroup 不等于memcg
2125  Returns stocks cached in percpu and reset cached information.
2126  this never be root cgroup 等于memcg
2128  nr_pages加等于nr_pages
2130  如果nr_pages大于size of first charge trial. "32" comes from vmscan.c's magic value.* TODO: maybe necessary to use big numbers in big irons.Returns stocks cached in percpu and reset cached information.
2133  local_irq_restore(flags)
调用者
名称描述
try_charge
mem_cgroup_uncharge_skmemmem_cgroup_uncharge_skmem - uncharge socket memory*@memcg: memcg to uncharge*@nr_pages: number of pages to uncharge