函数逻辑报告 |
Source Code:mm\page_io.c |
Create Date:2022-07-27 16:44:12 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:swap_readpage
函数原型:int swap_readpage(struct page *page, bool synchronous)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct page * | page | |
bool | synchronous |
354 | ret等于0 |
355 | sis等于page_swap_info(page) |
360 | VM_BUG_ON_PAGE(!PageSwapCache(page) && !synchronous, page) |
361 | VM_BUG_ON_PAGE(!PageLocked(page), page) |
362 | VM_BUG_ON_PAGE(PageUptodate(page), page) |
371 | 如果frontswap_load(page)恒等于0则 |
372 | SetPageUptodate(page) |
374 | 转到:out |
377 | 如果SWP_USED etc: see above 按位与SWP_FS则 |
382 | 如果非ret则Disable counters |
384 | 转到:out |
388 | 如果非ret则 |
398 | ret等于0 |
399 | bio等于get_swap_bio(GFP_KERNEL, page, end_swap_bio_read) |
400 | 如果(bio == NULL)则 |
403 | 转到:out |
411 | 如果synchronous则 |
413 | get_task_struct(当前进程) |
414 | bi_private等于当前进程 |
416 | Disable counters |
418 | qc等于submit_bio(bio) |
419 | 当synchronous循环 |
420 | set_current_state(深度睡眠态) |
421 | 如果非READ_ONCE(bi_private)则退出 |
424 | 如果非blk_poll(queue, qc, true)则io_schedule() |
430 | out : |
432 | 返回:ret |
名称 | 描述 |
---|---|
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 |
do_swap_page | We enter with non-exclusive mmap_sem (to exclude vma changes,* but allow concurrent faults), and pte mapped but not yet locked.* We return with pte unmapped and unlocked.* We return with the mmap_sem locked or unlocked in the same cases |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |