Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swap_state.c Create Date:2022-07-28 15:14:50
Last Modify:2020-03-17 22:02:06 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:swapin_nr_pages

Proto:static unsigned long swapin_nr_pages(unsigned long offset)

Type:unsigned long

Parameter:

TypeParameterName
unsigned longoffset
507  max_pages = 1 << READ_ONCE(How many pages do we try to swap or page in/out together? )
508  If max_pages <= 1 Then Return 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  If Not hits Then prev_offset = offset
516  atomic_set( & last_readahead_pages, pages)
518  Return pages
Caller
NameDescribe
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.