| 函数逻辑报告 | 
| Source Code: mm\zswap.c | Create Date:2022-07-27 16:53:53 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:attempts to compress and store an single page
函数原型:static int zswap_frontswap_store(unsigned type, unsigned long offset, struct page *page)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| unsigned | type | |
| unsigned long | offset | |
| struct page * | page | 
| 990 | tree等于zswap_trees[type] | 
| 998 | struct zswap_header zhdr = {swpentry = Store a type+offset into a swp_entry_t in an arch-independent format} | 
| 1007 | 如果非Enable/disable zswap (disabled by default) 或非tree则 | 
| 1013 | 如果zswap_is_full()则 | 
| 1033 | 如果非entry则 | 
| 1036 | 转到:reject | 
| 1040 | src等于kmap_atomic(page) | 
| 1041 | 如果zswap_is_page_same_filled(src, & value)则 | 
| 1054 | 如果非 the zswap_pool the entry's data is in则 | 
| 1060 | dst等于Must be an lvalue. Since @var must be a simple identifier,* we force a syntax error here if it isn't.(per-cpu code) | 
| 1061 | tfm等于get_cpu_ptr(tfm) | 
| 1062 | src等于kmap_atomic(page) | 
| 1064 | 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.(src) | 
| 1065 | put_cpu_ptr(tfm) | 
| 1066 | 如果ret则 | 
| 1068 | 转到:put_dstmem | 
| 1072 | hlen等于如果zpool_evictable(zpool)则zhdr的长度否则0 | 
| 1081 | 如果ret则 | 
| 1085 | buf等于zpool_map_handle(zpool, handle, rmal read-write mapping ) | 
| 1088 | zpool_unmap_handle(zpool, handle) | 
| 1089 | The weird & is necessary because sparse considers (void)(var) to be* a direct dereference of percpu variable (var).(per-cpu code) | 
| 1096 | insert_entry : | 
| 1098 | 加自旋锁 | 
| 1099 | 循环 | 
| 1108 | 自旋锁解锁 | 
| 1112 | zswap_update_total_size() | 
| 1114 | 返回:0 | 
| 1116 | put_dstmem : | 
| 1117 | The weird & is necessary because sparse considers (void)(var) to be* a direct dereference of percpu variable (var).(per-cpu code) | 
| 1119 | freepage : | 
| 1120 | zswap_entry_cache_free(entry) | 
| 1121 | reject : | 
| 1122 | 返回:ret | 
| 源代码转换工具 开放的插件接口 | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |