函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mem_cgroup_css_alloc

函数原型:static struct cgroup_subsys_state *__ref mem_cgroup_css_alloc(struct cgroup_subsys_state *parent_css)

返回类型:struct cgroup_subsys_state

参数:

类型参数名称
struct cgroup_subsys_state *parent_css
4972  parent等于mem_cgroup_from_css(parent_css)
4974  error等于负ENOMEM
4976  memcg等于mem_cgroup_alloc()
4977  如果非memcg则返回:错误号
4980  Upper bound of normal memory consumption range 等于PAGE_COUNTER_MAX
4981  soft_limit等于PAGE_COUNTER_MAX
4982  如果parent
4983  swappiness等于mem_cgroup_swappiness(parent)
4984  OOM-Killer disable 等于 OOM-Killer disable
4986  如果parent* Should the accounting and control be hierarchical, per subtree?
4987  * Should the accounting and control be hierarchical, per subtree? = true
4988  page_counter_init( & Accounted resources , & Accounted resources )
4989  page_counter_init( & swap, & swap)
4990  page_counter_init( & Legacy consumer-oriented counters , & Legacy consumer-oriented counters )
4991  page_counter_init( & kmem, & kmem)
4992  page_counter_init( & tcpmem, & tcpmem)
4993  否则
4994  page_counter_init( & Accounted resources , NULL)
4995  page_counter_init( & swap, NULL)
4996  page_counter_init( & Legacy consumer-oriented counters , NULL)
4997  page_counter_init( & kmem, NULL)
4998  page_counter_init( & tcpmem, NULL)
5004  如果parent不等于root_mem_cgroup* If %false, this subsystem is properly hierarchical - * configuration, resource accounting and restriction on a parent * cgroup cover those of its children. If %true, hierarchy support * is broken in some ways - some subsystems ignore hierarchy * complete = true
5009  如果非parent
5013  root_mem_cgroup等于memcg
5014  返回:css
5017  error等于memcg_online_kmem(memcg)
5018  如果error则转到:fail
5021  如果cgroup_subsys_on_dfl - fast test on whether a subsys is on default hierarchy*@ss: subsystem in question(memory_cgrp_subsys)且非Socket memory accounting disabled? Advanced usage; refcount, branch is enabled when: count != 0( & memcg_sockets_enabled_key)
5024  返回:css
5025  fail :
5026  mem_cgroup_id_remove(memcg)
5027  mem_cgroup_free(memcg)
5028  返回:错误号