Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swap_state.c Create Date:2022-07-28 15:14:48
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 int __swapin_nr_pages(unsigned long prev_offset, unsigned long offset, int hits, int max_pages, int prev_win)

Type:unsigned int

Parameter:

TypeParameterName
unsigned longprev_offset
unsigned longoffset
inthits
intmax_pages
intprev_win
474  pages = hits + 2
475  If pages == 2 Then
481  If offset != prev_offset + 1 && offset != prev_offset - 1 Then pages = 1
483  Else
484  roundup = 4
485  When roundup < pages cycle
486  roundup <<= 1
487  pages = roundup
490  If pages > max_pages Then pages = max_pages
494  last_ra = prev_win / 2
495  If pages < last_ra Then pages = last_ra
498  Return pages
Caller
NameDescribe
swapin_nr_pages
swap_ra_info