函数逻辑报告 |
Source Code:mm\swap_state.c |
Create Date:2022-07-27 16:45:15 |
Last Modify:2020-03-17 22:02:06 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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.
函数原型:struct page *swap_cluster_readahead(swp_entry_t entry, gfp_t gfp_mask, struct vm_fault *vmf)
返回类型:struct page
参数:
类型 | 参数 | 名称 |
---|---|---|
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 |
553 | mask等于swapin_nr_pages(offset)减1 |
558 | 如果此条件成立可能性大(为编译器优化)(SWP_USED etc: see above & (SWP_BLKDEV | SWP_FS))则 |
560 | 如果inode_read_congested(inode)则转到:skip |
564 | do_poll = false |
566 | start_offset等于offset按位与mask的反 |
567 | end_offset等于offset按位或mask |
568 | 如果非start_offset则start_offset自加 |
570 | 如果end_offset大于等于xtent of the swap_map 则end_offset等于xtent of the swap_map 减1 |
573 | blk_start_plug( & plug) |
574 | 以offset小于等于end_offset循环 |
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 | 如果非page则继续下一循环 |
581 | 如果page_allocated则 |
582 | swap_readpage(page, false) |
583 | 如果offset不等于entry_offset则 |
584 | SetPageReadahead(page) |
585 | Disable counters |
590 | blk_finish_plug( & plug) |
592 | lru_add_drain() |
593 | skip : |
名称 | 描述 |
---|---|
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. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |