Function report |
Source Code:mm\memcontrol.c |
Create Date:2022-07-28 16:14:10 |
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_try_charge - try charging a page*@page: page to charge*@mm: mm context of the victim*@gfp_mask: reclaim mode*@memcgp: charged memcg return*@compound: charge the page as compound or small page* Try to charge @page to the memcg that @mm belongs
Proto:int mem_cgroup_try_charge(struct page *page, struct mm_struct *mm, gfp_t gfp_mask, struct mem_cgroup **memcgp, bool compound)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct page * | page | |
struct mm_struct * | mm | |
gfp_t | gfp_mask | |
struct mem_cgroup ** | memcgp | |
bool | compound |
6335 | struct mem_cgroup * memcg = NULL |
6336 | nr_pages = If compound Then hpage_nr_pages(page) Else 1 |
6337 | ret = 0 |
6339 | If mem_cgroup_disabled() Then Go to out |
6342 | If PageSwapCache(page) Then |
6350 | VM_BUG_ON_PAGE(!PageLocked(page), page) |
6351 | If mem_cgroup Then Go to out |
6354 | If Whether the swap controller is active Then |
6355 | swp_entry_t ent = {val = page_private(page), } |
6356 | id = lookup_swap_cgroup_id(ent) |
6359 | memcg = mem_cgroup_from_id - look up a memcg from a memcg id*@id: the memcg id to look up* Caller must hold rcu_read_lock(). |
6369 | ret = try_charge(memcg, gfp_mask, nr_pages) |
6372 | out : |
6374 | Return ret |
Name | Describe |
---|---|
unuse_pte | No need to decide whether this PTE shares the swap entry with others,* just let do_wp_page work it out if a write is requested later - to* force COW, vm_page_prot omits write permission from any private vma. |
collapse_huge_page | |
mem_cgroup_try_charge_delay | |
mcopy_atomic_pte |
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 |