Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sume_stock: Try to consume stocked charge on this cpu.*@memcg: memcg to consume from.*@nr_pages: how many pages to charge.* The charges will only happen if @memcg matches the current cpu's memcg* stock, and at least @nr_pages are available in that stock

Proto:static bool consume_stock(struct mem_cgroup *memcg, unsigned int nr_pages)

Type:bool

Parameter:

TypeParameterName
struct mem_cgroup *memcg
unsigned intnr_pages
2059  bool ret = false
2061  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 Return ret
2064  local_irq_save(flags)
2066  stock = this_cpu_ptr( & memcg_stock)
2067  If memcg == this never be root cgroup && nr_pages >= nr_pages Then
2068  nr_pages -= nr_pages
2069  ret = true
2072  local_irq_restore(flags)
2074  Return ret
Caller
NameDescribe
try_charge