函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__swapin_nr_pages

函数原型:static unsigned int __swapin_nr_pages(unsigned long prev_offset, unsigned long offset, int hits, int max_pages, int prev_win)

返回类型:unsigned int

参数:

类型参数名称
unsigned longprev_offset
unsigned longoffset
inthits
intmax_pages
intprev_win
474  pages等于hits加2
475  如果pages恒等于2则
481  如果offset不等于prev_offset加1且offset不等于prev_offset减1则pages等于1
483  否则
484  roundup等于4
485 roundup小于pages循环
486  roundup左移等于1位
487  pages等于roundup
490  如果pages大于max_pagespages等于max_pages
494  last_ra等于prev_win除2
495  如果pages小于last_rapages等于last_ra
498  返回:pages
调用者
名称描述
swapin_nr_pages
swap_ra_info