函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mem_cgroup_update_lru_size - account for adding or removing an lru page*@lruvec: mem_cgroup per zone lru vector*@lru: index of lru list the page is sitting on*@zid: zone id of the accounted pages*@nr_pages: positive when adding or negative when removing*

函数原型:void mem_cgroup_update_lru_size(struct lruvec *lruvec, enum lru_list lru, int zid, int nr_pages)

返回类型:void

参数:

类型参数名称
struct lruvec *lruvec
enum lru_listlru
intzid
intnr_pages
1261  如果mem_cgroup_disabled()则返回
1264  mz等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(lruvec, structmem_cgroup_per_node, lruvec)
1265  lru_size等于lru_zone_size[zid][lru]
1267  如果nr_pages小于0则lru_size加等于nr_pages
1270  size等于lru_size
1271  如果WARN_ONCE(size < 0, "%s(%p, %d, %d): lru_size %ld\n", __func__, lruvec, lru, nr_pages, size)则
1274  VM_BUG_ON(1)
1275  lru_size等于0
1278  如果nr_pages大于0则lru_size加等于nr_pages
调用者
名称描述
update_lru_sizesUpdate LRU sizes after isolating pages. The LRU size updates must* be complete before mem_cgroup_update_lru_size due to a santity check.