Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:The user of this function is...* RES_LIMIT.

Proto:static ssize_t mem_cgroup_write(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
3500  memcg = mem_cgroup_from_css(of_css(of))
3504  buf = strstrip(buf)
3505  ret = page_counter_memparse - memparse() for page counter limits*@buf: string to parse*@max: string meaning maximum possible value*@nr_pages: returns the result in number of pages* Returns -EINVAL, or 0 and @nr_pages on success. @nr_pages will be
3506  If ret Then Return ret
3510  Case MEMFILE_ATTR(private) == RES_LIMIT
3511  If mem_cgroup_is_root(memcg) Then
3512  ret = -EINVAL
3513  Break
3516  Case MEMFILE_TYPE(private) == _MEM
3518  Break
3519  Case MEMFILE_TYPE(private) == _MEMSWAP
3521  Break
3522  Case MEMFILE_TYPE(private) == _KMEM
3523  pr_warn_once("kmem.limit_in_bytes is deprecated and will be removed. Please report your usecase to linux-mm@kvack.org if you depend on this functionality.\n")
3527  Break
3528  Case MEMFILE_TYPE(private) == _TCP
3530  Break
3532  Break
3534  soft_limit = nr_pages
3535  ret = 0
3536  Break
3538  Return If ret Else nbytes