| Function report | 
| Source Code: mm\memcontrol.c | Create Date:2022-07-28 16: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:mem_cgroup_can_attach
Proto:static int mem_cgroup_can_attach(struct cgroup_taskset *tset)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct cgroup_taskset * | tset | 
| 5605 | struct mem_cgroup * memcg = NULL | 
| 5610 | ret = 0 | 
| 5613 | If cgroup_subsys_on_dfl - fast test on whether a subsys is on default hierarchy*@ss: subsystem in question(memory_cgrp_subsys) Then Return 0 | 
| 5622 | p = NULL | 
| 5628 | If Not p Then Return 0 | 
| 5636 | move_flags = READ_ONCE(* Should we move charges of a task when a task is moved into this * mem_cgroup ? And what type of charges should we move ?) | 
| 5637 | If Not move_flags Then Return 0 | 
| 5640 | from = mem_cgroup_from_task(p) | 
| 5645 | If Not mm Then Return 0 | 
| 5652 | VM_BUG_ON(moved_charge) | 
| 5653 | VM_BUG_ON(moved_swap) | 
| 5655 | spin_lock( & r from, to ) | 
| 5659 | flags = move_flags | 
| 5660 | spin_unlock( & r from, to ) | 
| 5663 | ret = mem_cgroup_precharge_mc(mm) | 
| 5664 | If ret Then mem_cgroup_clear_mc() | 
| 5666 | Else | 
| 5669 | Return ret | 
| 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 |