Function report |
Source Code:mm\memcontrol.c |
Create Date:2022-07-28 16:14:06 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:mem_cgroup_protected - check if memory consumption is in the normal range*@root: the top ancestor of the sub-tree being checked*@memcg: the memory cgroup to check* WARNING: This function is not stateless! It can only be used as part
Proto:enum mem_cgroup_protection mem_cgroup_protected(struct mem_cgroup *root, struct mem_cgroup *memcg)
Type:enum mem_cgroup_protection
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct mem_cgroup * | root | |
| struct mem_cgroup * | memcg |
| 6250 | If mem_cgroup_disabled() Then Return MEMCG_PROT_NONE |
| 6253 | If Not root Then root = root_mem_cgroup |
| 6255 | If memcg == root Then Return MEMCG_PROT_NONE |
| 6258 | usage = page_counter_read( & Accounted resources ) |
| 6259 | If Not usage Then Return MEMCG_PROT_NONE |
| 6267 | If Not parent Then Return MEMCG_PROT_NONE |
| 6274 | emin = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(emin, parent_emin) |
| 6275 | If emin && parent_emin Then |
| 6278 | min_usage = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(usage, min) |
| 6279 | siblings_min_usage = atomic_long_read( & children_min_usage) |
| 6288 | elow = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(elow, parent_elow) |
| 6289 | If elow && parent_elow Then |
| 6292 | low_usage = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(usage, low) |
| 6293 | siblings_low_usage = atomic_long_read( & children_low_usage) |
| 6301 | exit : |
| 6305 | If usage <= emin Then Return MEMCG_PROT_MIN |
| 6307 | Else if usage <= elow Then Return MEMCG_PROT_LOW |
| 6309 | Else Return MEMCG_PROT_NONE |
| 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 |