Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:hugetlb_cgroup_reset

Proto:static ssize_t hugetlb_cgroup_reset(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off)

Type:ssize_t

Parameter:

TypeParameterName
struct kernfs_open_file *of
char *buf
size_tnbytes
loff_toff
322  ret = 0
324  h_cg = hugetlb_cgroup_from_css(of_css(of))
326  counter = * the counter to account for hugepages from hugetlb.[MEMFILE_IDX(private)]
329  Case MEMFILE_ATTR(private) == RES_MAX_USAGE
330  page_counter_reset_watermark(counter)
331  Break
332  Case MEMFILE_ATTR(private) == RES_FAILCNT
333  failcnt = 0
334  Break
335  Default
336  ret = -EINVAL
337  Break
339  Return If ret Else nbytes