Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mem_cgroup_read_u64

Proto:static u64 mem_cgroup_read_u64(struct cgroup_subsys_state *css, struct cftype *cft)

Type:u64

Parameter:

TypeParameterName
struct cgroup_subsys_state *css
struct cftype *cft
3252  memcg = mem_cgroup_from_css(css)
3256  Case MEMFILE_TYPE(private) == _MEM
3257  counter = Accounted resources
3258  Break
3259  Case MEMFILE_TYPE(private) == _MEMSWAP
3260  counter = Legacy consumer-oriented counters
3261  Break
3262  Case MEMFILE_TYPE(private) == _KMEM
3263  counter = kmem
3264  Break
3265  Case MEMFILE_TYPE(private) == _TCP
3266  counter = tcpmem
3267  Break
3268  Default
3269  BUG()
3273  Case MEMFILE_ATTR(private) == RES_USAGE
3274  If counter == Accounted resources Then Return mem_cgroup_usage(memcg, false) * PAGE_SIZE
3279  Case MEMFILE_ATTR(private) == RES_LIMIT
3280  Return max * PAGE_SIZE
3282  Return legacy * PAGE_SIZE
3283  Case MEMFILE_ATTR(private) == RES_FAILCNT
3284  Return failcnt
3286  Return soft_limit * PAGE_SIZE
3287  Default
3288  BUG()