函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swap_state.c Create Date:2022-07-27 16:45:10
Last Modify:2020-03-17 22:02:06 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:swapin_nr_pages

函数原型:static unsigned long swapin_nr_pages(unsigned long offset)

返回类型:unsigned long

参数:

类型参数名称
unsigned longoffset
507  max_pages等于1左移READ_ONCE(How many pages do we try to swap or page in/out together? )位
508  如果max_pages小于等于1则返回:1
511  hits等于atomic_xchg( & swapin_readahead_hits, 0)
512  pages等于__swapin_nr_pages(prev_offset, offset, hits, max_pages, atomic_read( & last_readahead_pages))
514  如果非hitsprev_offset等于offset
516  atomic_set( & last_readahead_pages, pages)
518  返回:pages
调用者
名称描述
swap_cluster_readaheadswap_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.