Function report |
Source Code:mm\swap_state.c |
Create Date:2022-07-28 15:14:44 |
Last Modify:2020-03-17 22:02:06 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__read_swap_cache_async
Proto: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)
Type:struct page
Parameter:
Type | Parameter | Name |
---|---|---|
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 | Do |
375 | If Not si Then Break |
379 | put_swap_device(si) |
380 | If found_page Then Break |
391 | If Not __swp_swapcount(entry) && swap_slot_cache_enabled Then Break |
397 | If Not new_page Then |
406 | err = swapcache_prepare(entry) |
413 | cond_resched() |
414 | Continue |
415 | Else if err Then Break |
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 | If Value is more likely to compile time(!err) Then |
426 | * new_page_allocated = true |
427 | Return new_page |
434 | put_swap_page(new_page, entry) |
437 | If new_page Then Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page. |
439 | Return found_page |
Name | Describe |
---|---|
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 |
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 |