Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memcontrol.c Create Date:2022-07-28 16:10:27
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:static void refill_stock(struct mem_cgroup *memcg, unsigned int nr_pages)

Type:void

Parameter:

TypeParameterName
struct mem_cgroup *memcg
unsigned intnr_pages
2121  local_irq_save(flags)
2123  stock = this_cpu_ptr( & memcg_stock)
2124  If this never be root cgroup != memcg Then
2125  Returns stocks cached in percpu and reset cached information.
2126  this never be root cgroup = memcg
2128  nr_pages += nr_pages
2130  If 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. Then Returns stocks cached in percpu and reset cached information.
2133  local_irq_restore(flags)
Caller
NameDescribe
try_charge
mem_cgroup_uncharge_skmemmem_cgroup_uncharge_skmem - uncharge socket memory*@memcg: memcg to uncharge*@nr_pages: number of pages to uncharge