Function report |
Source Code:kernel\cgroup\cgroup-v1.c |
Create Date:2022-07-28 11:13:28 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:The guts of cgroup1 mount - find or create cgroup_root to use
Proto:static int cgroup1_root_to_use(struct fs_context *fc)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct fs_context * | fc |
1115 | ctx = cgroup_fc2context(fc) |
1121 | ret = check_cgroupfs_options(fc) |
1137 | If Not percpu_ref_tryget_live - try to increment a live percpu refcount*@ref: percpu_ref to try-get* Increment a percpu refcount unless it has already been killed Then Return 1 |
1142 | rate across the hierarchies (root) |
1143 | bool name_match = false |
1145 | If root == The default hierarchy, reserved for the subsystems that are otherwise* unattached - it never has more than a single cgroup, and all tasks are* part of that cgroup. Then Continue |
1153 | If Hierarchy name Then |
1154 | If strcmp(Hierarchy name , The name for this hierarchy - may be empty ) Then Continue |
1156 | name_match = true |
1165 | If Not name_match Then Continue |
1167 | Return -EBUSY |
1170 | If Hierarchy-specific flags ^ CGRP_ROOT_* flags Then pr_warn("new mount options do not match the existing superblock, will be ignored\n") |
1174 | Return 0 |
1182 | If Not Selected subsystems && Not User explicitly requested empty subsystem Then Return cg_invalf(fc, "cgroup1: No subsys list or none specified") |
1186 | If ns != cgroup namespace for init task Then Return -EPERM |
1189 | root = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
1194 | init_cgroup_root(ctx) |
1196 | ret = cgroup_setup_root(root, Selected subsystems ) |
1197 | If ret Then cgroup_free_root(root) |
1199 | Return ret |
Name | Describe |
---|---|
cgroup1_get_tree |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |