函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

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

返回类型:bool

参数:

类型参数名称
struct mem_cgroup *memcg
unsigned intnr_pages
2059  bool ret = false
2061  如果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.则返回:ret
2064  local_irq_save(flags)
2066  stock等于this_cpu_ptr( & memcg_stock)
2067  如果memcg恒等于 this never be root cgroup nr_pages大于等于nr_pages
2068  nr_pages减等于nr_pages
2069  ret = true
2072  local_irq_restore(flags)
2074  返回:ret
调用者
名称描述
try_charge