Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:rns 0 if the page was successfully decompressed* return -1 on entry not found or error

Proto:static int zswap_frontswap_load(unsigned type, unsigned long offset, struct page *page)

Type:int

Parameter:

TypeParameterName
unsignedtype
unsigned longoffset
struct page *page
1132  tree = zswap_trees[type]
1140  spin_lock( & lock)
1141  entry = aller must hold the tree lock
1142  If Not entry Then
1144  spin_unlock( & lock)
1145  Return -1
1147  spin_unlock( & lock)
1149  If Not the length in bytes of the compressed page data. Needed during Then
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  Go to 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  If zpool_evictable(zpool) Then 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  spin_lock( & lock)
1171  aller must hold the tree lock* remove from the tree and free it, if nobody reference the entry
1172  spin_unlock( & lock)
1174  Return 0