函数逻辑报告 |
Source Code:mm\swap_state.c |
Create Date:2022-07-27 16:45:00 |
| Last Modify:2020-03-17 22:02:06 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Lookup a swap entry in the swap cache. A found page will be returned* unlocked and with its refcount incremented - we rely on the kernel* lock getting page table operations atomic even if we drop the page* lock before returning.
函数原型:struct page *lookup_swap_cache(swp_entry_t entry, struct vm_area_struct *vma, unsigned long addr)
返回类型:struct page
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| swp_entry_t | entry | |
| struct vm_area_struct * | vma | |
| unsigned long | addr |
| 317 | 如果非si则返回:NULL |
| 320 | put_swap_device(si) |
| 322 | INC_CACHE_INFO(find_total) |
| 323 | 如果page则 |
| 324 | vma_ra等于swap_use_vma_readahead() |
| 341 | win等于SWAP_RA_WIN(ra_val) |
| 342 | hits等于SWAP_RA_HITS(ra_val) |
| 343 | 如果readahead则hits等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(int, hits + 1, SWAP_RA_HITS_MAX) |
| 345 | atomic_long_set( & swap_readahead_info, SWAP_RA_VAL(addr, win, hits)) |
| 349 | 如果readahead则 |
| 350 | Disable counters |
| 351 | 如果非vma或非vma_ra则atomic_inc( & swapin_readahead_hits) |
| 356 | 返回:page |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |