函数逻辑报告 |
Source Code:mm\memcontrol.c |
Create Date:2022-07-27 17:48:40 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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
函数原型:int mem_cgroup_try_charge(struct page *page, struct mm_struct *mm, gfp_t gfp_mask, struct mem_cgroup **memcgp, bool compound)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
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等于如果compound则hpage_nr_pages(page)否则1 |
6337 | ret等于0 |
6339 | 如果mem_cgroup_disabled()则转到:out |
6342 | 如果PageSwapCache(page)则 |
6350 | VM_BUG_ON_PAGE(!PageLocked(page), page) |
6351 | 如果mem_cgroup则转到:out |
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) |
6371 | 设置一个css引用 |
6372 | out : |
6374 | 返回:ret |
名称 | 描述 |
---|---|
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 | |
__replace_page | __replace_page - replace page in vma by new page |
__add_to_page_cache_locked |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |