Function report |
Source Code:mm\swap_state.c |
Create Date:2022-07-28 15:14:40 |
| Last Modify:2020-03-17 22:02:06 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Lookup a swap entry in the swap cache. A found page will be returned* unlocked and with its refcount incremented - we rely on the kernel* lock getting page table operations atomic even if we drop the page* lock before returning.
Proto:struct page *lookup_swap_cache(swp_entry_t entry, struct vm_area_struct *vma, unsigned long addr)
Type:struct page
Parameter:
| Type | Parameter | Name |
|---|---|---|
| swp_entry_t | entry | |
| struct vm_area_struct * | vma | |
| unsigned long | addr |
| 317 | If Not si Then Return NULL |
| 320 | put_swap_device(si) |
| 322 | INC_CACHE_INFO(find_total) |
| 323 | If page Then |
| 324 | vma_ra = swap_use_vma_readahead() |
| 335 | readahead = TestClearPageReadahead(page) |
| 341 | win = SWAP_RA_WIN(ra_val) |
| 342 | hits = SWAP_RA_HITS(ra_val) |
| 343 | If readahead Then hits = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(int, hits + 1, SWAP_RA_HITS_MAX) |
| 345 | atomic_long_set( & swap_readahead_info, SWAP_RA_VAL(addr, win, hits)) |
| 349 | If readahead Then |
| 350 | Disable counters |
| 351 | If Not vma || Not vma_ra Then atomic_inc( & swapin_readahead_hits) |
| 356 | Return page |
| 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 |