Function report |
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 activity | Download SCCT | Chinese |
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:
Type | Parameter | Name |
---|---|---|
unsigned | type | |
unsigned long | offset | |
struct page * | page |
1132 | tree = zswap_trees[type] |
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) |
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 |
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) |
1169 | freeentry : |
1172 | spin_unlock( & lock) |
1174 | Return 0 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |