函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:The user of this function is...* RES_LIMIT.

函数原型:static ssize_t mem_cgroup_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off)

返回类型:ssize_t

参数:

类型参数名称
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  如果ret则返回:ret
3510  :MEMFILE_ATTR(private)恒等于RES_LIMIT
3511  如果mem_cgroup_is_root(memcg)则
3512  ret等于负EINVAL
3513  退出
3516  :MEMFILE_TYPE(private)恒等于_MEM
3517  ret等于mem_cgroup_resize_max(memcg, nr_pages, false)
3518  退出
3519  :MEMFILE_TYPE(private)恒等于_MEMSWAP
3520  ret等于mem_cgroup_resize_max(memcg, nr_pages, true)
3521  退出
3522  :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  退出
3528  :MEMFILE_TYPE(private)恒等于_TCP
3532  退出
3534  soft_limit等于nr_pages
3535  ret等于0
3536  退出
3538  返回:如果ret否则nbytes