函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Register operations for frontswap

函数原型:void frontswap_register_ops(struct frontswap_ops *ops)

返回类型:void

参数:

类型参数名称
struct frontswap_ops *ops
115  DECLARE_BITMAP(a, MAX_SWAPFILES)
116  DECLARE_BITMAP(b, MAX_SWAPFILES)
120  bitmap_zero(a, MAX_SWAPFILES)
121  bitmap_zero(b, MAX_SWAPFILES)
123  加自旋锁
124  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)
125  如果非WARN_ON(!swap in-use, one bit per page )则设置内存位
128  自旋锁解锁
131  for_each_set_bit(i, a, MAX_SWAPFILES)
132  init(i)
139  循环
140  private pointer to next ops 等于swap_ops are added by frontswap_register_ops, and provide the* frontswap "backend" implementation functions. Multiple implementations* may be registered, but implementations can never deregister. This
141 cmpxchg( & swap_ops are added by frontswap_register_ops, and provide the* frontswap "backend" implementation functions. Multiple implementations* may be registered, but implementations can never deregister. This, private pointer to next ops , ops)不等于 private pointer to next ops 循环
143  Advanced usage; refcount, branch is enabled when: count != 0( & frontswap_enabled_key)
145  加自旋锁
146  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)
147  如果swap in-use, one bit per page 设置内存位
150  自旋锁解锁
158  如果此条件成立可能性小(为编译器优化)(!bitmap_equal(a, b, MAX_SWAPFILES))则
159 i小于MAX_SWAPFILES循环
调用者
名称描述
init_zswapmodule init and exit