函数逻辑报告 |
Source Code:mm\swap_state.c |
Create Date:2022-07-27 16:45:04 |
Last Modify:2020-03-17 22:02:06 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__read_swap_cache_async
函数原型:struct page *__read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask, struct vm_area_struct *vma, unsigned long addr, bool *new_page_allocated)
返回类型:struct page
参数:
类型 | 参数 | 名称 |
---|---|---|
swp_entry_t | entry | |
gfp_t | gfp_mask | |
struct vm_area_struct * | vma | |
unsigned long | addr | |
bool * | new_page_allocated |
363 | struct page * found_page = NULL, * new_page = NULL |
366 | * new_page_allocated = false |
368 | 循环 |
379 | put_swap_device(si) |
380 | 如果found_page则退出 |
397 | 如果非new_page则 |
406 | err等于swapcache_prepare(entry) |
413 | cond_resched() |
414 | 继续下一循环 |
419 | __SetPageLocked(new_page) |
421 | err等于add_to_swap_cache resembles add_to_page_cache_locked on swapper_space,* but sets SwapCache flag and private instead of mapping and index. |
422 | 如果此条件成立可能性大(为编译器优化)(!err)则 |
426 | * new_page_allocated = true |
427 | 返回:new_page |
434 | put_swap_page(new_page, entry) |
437 | 如果new_page则Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page. |
439 | 返回:found_page |
名称 | 描述 |
---|---|
read_swap_cache_async | Locate a page of swap in physical memory, reserving swap cache space* and reading the disk if it is not already cached.* A failure return means that either the page allocation failed or that* the swap entry is no longer in use. |
swap_cluster_readahead | swap_cluster_readahead - swap in pages in hope we need them soon*@entry: swap entry of this memory*@gfp_mask: memory allocation flags*@vmf: fault information* Returns the struct page for entry and addr, after queueing swapin. |
swap_vma_readahead | swap_vma_readahead - swap in pages in hope we need them soon*@entry: swap entry of this memory*@gfp_mask: memory allocation flags*@vmf: fault information* Returns the struct page for entry and addr, after queueing swapin.* Primitive swap readahead code |
zswap_get_swap_cache_page | zswap_get_swap_cache_page* This is an adaption of read_swap_cache_async()* This function tries to find a page with the given swap entry* in the swapper_space address space (the swap cache). If the page* is found, it is returned in retpage |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |