Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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*

Proto:void mem_cgroup_update_lru_size(struct lruvec *lruvec, enum lru_list lru, int zid, int nr_pages)

Type:void

Parameter:

TypeParameterName
struct lruvec *lruvec
enum lru_listlru
intzid
intnr_pages
1261  If mem_cgroup_disabled() Then Return
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  If nr_pages < 0 Then lru_size += nr_pages
1270  size = lru_size
1271  If WARN_ONCE(size < 0, "%s(%p, %d, %d): lru_size %ld\n", __func__, lruvec, lru, nr_pages, size) Then
1274  VM_BUG_ON(1)
1275  lru_size = 0
1278  If nr_pages > 0 Then lru_size += nr_pages