Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\frontswap.c Create Date:2022-07-28 15:21:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Register operations for frontswap

Proto:void frontswap_register_ops(struct frontswap_ops *ops)

Type:void

Parameter:

TypeParameterName
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  spin_lock( & swap_lock)
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  If Not WARN_ON(!swap in-use, one bit per page ) Then Atomically set a bit in memory
128  spin_unlock( & swap_lock)
131  for_each_set_bit(i, a, MAX_SWAPFILES)
132  init(i)
139  Do
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  When 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 cycle
143  Advanced usage; refcount, branch is enabled when: count != 0( & frontswap_enabled_key)
145  spin_lock( & swap_lock)
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  If swap in-use, one bit per page Then Atomically set a bit in memory
150  spin_unlock( & swap_lock)
158  If Value for the false possibility is greater at compile time(!bitmap_equal(a, b, MAX_SWAPFILES)) Then
159  When i < MAX_SWAPFILES cycle
Caller
NameDescribe
init_zswapmodule init and exit