函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\frontswap.c Create Date:2022-07-27 16:52:03
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__frontswap_unuse_pages

函数原型:static int __frontswap_unuse_pages(unsigned long total, unsigned long *unused, int *swapid)

返回类型:int

参数:

类型参数名称
unsigned longtotal
unsigned long *unused
int *swapid
385  ret等于负EINVAL
386  struct swap_info_struct * si = NULL
388  total_pages_to_unuse等于total
389  pages等于0, pages_to_unuse等于0
391  assert_spin_locked( & swap_lock)
392  plist_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop counter*@head: the head for your list*@mem: the name of the list_head within the struct(si, & all active swap_info_structs* protected with swap_lock, and ordered by priority., list)
393  si_frontswap_pages等于atomic_read( & swap pages in-use counter )
396  否则
398  pages_to_unuse等于0
402  ret等于负ENOMEM
403  继续下一循环
405  vm_unacct_memory(pages)
406  unused等于pages_to_unuse
407  swapid等于strange name for an index
408  ret等于0
409  退出
412  返回:ret
调用者
名称描述
__frontswap_shrinkUsed to check if it's necessory and feasible to unuse pages.* Return 1 when nothing to do, 0 when need to shink pages,* error code when there is an error.