Function report |
Source Code:mm\memcontrol.c |
Create Date:2022-07-28 16:12:00 |
| 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_usage_register_event
Proto:static int __mem_cgroup_usage_register_event(struct mem_cgroup *memcg, struct eventfd_ctx *eventfd, const char *args, enum res_type type)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct mem_cgroup * | memcg | |
| struct eventfd_ctx * | eventfd | |
| const char * | args | |
| enum res_type | type |
| 3944 | mutex_lock( & protect arrays of thresholds ) |
| 3948 | usage = mem_cgroup_usage(memcg, false) |
| 3951 | usage = mem_cgroup_usage(memcg, true) |
| 3952 | Else BUG() |
| 3956 | If Primary thresholds array Then __mem_cgroup_threshold(memcg, type == _MEMSWAP) |
| 3959 | size = If Primary thresholds array Then Size of entries[] + 1 Else 1 |
| 3963 | If Not new Then |
| 3967 | Size of entries[] = size |
| 3970 | If Primary thresholds array Then |
| 3971 | memcpy(Array of thresholds , Array of thresholds , (size - 1) * sizeof(structmem_cgroup_threshold)) |
| 3980 | sort(Array of thresholds , size, sizeof(structmem_cgroup_threshold), compare_thresholds, NULL) |
| 3993 | Else Break |
| 3998 | kfree(* Spare threshold array. * This is needed to make mem_cgroup_unregister_event() "never fail". * It must be able to store at least primary->size - 1 entries.) |
| 3999 | * Spare threshold array. * This is needed to make mem_cgroup_unregister_event() "never fail". * It must be able to store at least primary->size - 1 entries. = Primary thresholds array |
| 4006 | unlock : |
| 4009 | Return ret |
| Name | Describe |
|---|---|
| mem_cgroup_usage_register_event | |
| memsw_cgroup_usage_register_event |
| 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 |