函数逻辑报告 |
Source Code:mm\vmscan.c |
Create Date:2022-07-27 15:41:31 |
| Last Modify:2022-05-23 13:41:30 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Same as remove_mapping, but if the page is removed from the mapping, it* gets returned with a refcount of 0.
函数原型:static int __remove_mapping(struct address_space *mapping, struct page *page, bool reclaimed, struct mem_cgroup *target_memcg)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct address_space * | mapping | |
| struct page * | page | |
| bool | reclaimed | |
| struct mem_cgroup * | target_memcg |
| 871 | BUG_ON(!PageLocked(page)) |
| 872 | BUG_ON(mapping != page_mapping(page)) |
| 874 | xa_lock_irqsave( & i_pages, flags) |
| 901 | 如果非page_ref_freeze(page, refcount)则转到:cannot_free |
| 904 | 如果此条件成立可能性小(为编译器优化)(PageDirty(page))则 |
| 905 | page_ref_unfreeze(page, refcount) |
| 906 | 转到:cannot_free |
| 909 | 如果PageSwapCache(page)则 |
| 910 | swp_entry_t swap = {val = page_private(page)} |
| 911 | mem_cgroup_swapout(page, swap) |
| 912 | __delete_from_swap_cache(page, swap) |
| 913 | xa_unlock_irqrestore( & i_pages, flags) |
| 914 | put_swap_page(page, swap) |
| 915 | 否则 |
| 917 | void * shadow = NULL |
| 940 | xa_unlock_irqrestore( & i_pages, flags) |
| 946 | 返回:1 |
| 948 | cannot_free : |
| 949 | xa_unlock_irqrestore( & i_pages, flags) |
| 950 | 返回:0 |
| 名称 | 描述 |
|---|---|
| remove_mapping | Attempt to detach a locked page from its ->mapping. If it is dirty or if* someone else has a ref on the page, abort and return 0. If it was* successfully detached, return 1. Assumes the caller has a single ref on* this page. |
| shrink_page_list | shrink_page_list() returns the number of reclaimed pages |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |