Function report |
Source Code:mm\swap_state.c |
Create Date:2022-07-28 15:14:56 |
| Last Modify:2020-03-17 22:02:06 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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.
Proto:struct page *swap_cluster_readahead(swp_entry_t entry, gfp_t gfp_mask, struct vm_fault *vmf)
Type:struct page
Parameter:
| Type | Parameter | Name |
|---|---|---|
| swp_entry_t | entry | |
| gfp_t | gfp_mask | |
| struct vm_fault * | vmf |
| 543 | entry_offset = Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format |
| 544 | offset = entry_offset |
| 547 | si = swp_swap_info(entry) |
| 549 | bool do_poll = true, page_allocated |
| 550 | vma = Target VMA |
| 551 | addr = Faulting virtual address |
| 553 | mask = swapin_nr_pages(offset) - 1 |
| 558 | If Value is more likely to compile time(SWP_USED etc: see above & (SWP_BLKDEV | SWP_FS)) Then |
| 560 | If inode_read_congested(inode) Then Go to skip |
| 564 | do_poll = false |
| 566 | start_offset = offset & ~mask |
| 567 | end_offset = offset | mask |
| 568 | If Not start_offset Then start_offset++ |
| 570 | If end_offset >= xtent of the swap_map Then end_offset = xtent of the swap_map - 1 |
| 573 | blk_start_plug( & plug) |
| 574 | When offset <= end_offset cycle |
| 576 | page = __read_swap_cache_async(Store a type+offset into a swp_entry_t in an arch-independent format, gfp_mask, vma, addr, & page_allocated) |
| 579 | If Not page Then Continue |
| 581 | If page_allocated Then |
| 582 | swap_readpage(page, false) |
| 583 | If offset != entry_offset Then |
| 584 | SetPageReadahead(page) |
| 585 | Disable counters |
| 590 | blk_finish_plug( & plug) |
| 592 | lru_add_drain() |
| 593 | skip : |
| Name | Describe |
|---|---|
| swapin_readahead | swapin_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. |
| 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 |