函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:rns 0 if the page was successfully decompressed* return -1 on entry not found or error

函数原型:static int zswap_frontswap_load(unsigned type, unsigned long offset, struct page *page)

返回类型:int

参数:

类型参数名称
unsignedtype
unsigned longoffset
struct page *page
1132  tree等于zswap_trees[type]
1140  加自旋锁
1141  entry等于aller must hold the tree lock
1142  如果非entry
1144  自旋锁解锁
1145  返回:负1
1147  自旋锁解锁
1149  如果非 the length in bytes of the compressed page data. Needed during
1150  dst等于kmap_atomic(page)
1151  zswap_fill_page(dst, value of the same-value filled pages which have same content)
1152  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(dst)
1153  转到:freeentry
1157  dlen等于PAGE_SIZE
1158  src等于zpool_map_handle(zpool, zpool allocation handle that stores the compressed page data, ad-only (no copy-out at unmap time) )
1159  如果zpool_evictable(zpool)则src加等于sizeof(structzswap_header)
1161  dst等于kmap_atomic(page)
1162  tfm等于get_cpu_ptr(tfm)
1163  ret等于crypto_comp_decompress(tfm, src, the length in bytes of the compressed page data. Needed during, dst, & dlen)
1164  put_cpu_ptr(tfm)
1165  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(dst)
1166  zpool_unmap_handle(zpool, zpool allocation handle that stores the compressed page data)
1167  BUG_ON(ret)
1169  freeentry :
1170  加自旋锁
1171  aller must hold the tree lock* remove from the tree and free it, if nobody reference the entry
1172  自旋锁解锁
1174  返回:0