函数逻辑报告 |
Source Code:mm\swapfile.c |
Create Date:2022-07-27 16:50:54 |
Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:swap_count_continued - when the original swap_map count is incremented* from SWAP_MAP_MAX, check if there is already a continuation page to carry* into, carry if so, or else fail until a new continuation page is allocated;* when the original swap_map
函数原型:static bool swap_count_continued(struct swap_info_struct *si, unsigned long offset, unsigned char count)
返回类型:bool
参数:
类型 | 参数 | 名称 |
---|---|---|
struct swap_info_struct * | si | |
unsigned long | offset | |
unsigned char | count |
3650 | 如果page_private(head)不等于SWP_CONTINUED则 |
3652 | 返回:false |
3655 | 加自旋锁 |
3658 | map等于kmap_atomic(page)加offset |
3660 | 如果count恒等于Max duplication count, in first swap_map 则转到:init_map |
3668 | 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.(map) |
3671 | map等于kmap_atomic(page)加offset |
3673 | 如果map恒等于Max count, in each swap_map continuation 则 |
3674 | 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.(map) |
3680 | map等于kmap_atomic(page)加offset |
3681 | init_map : |
3681 | map等于0 |
3683 | map加等于1 |
3684 | 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.(map) |
3687 | map等于kmap_atomic(page)加offset |
3692 | ret = true |
3694 | 否则 |
3700 | 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.(map) |
3703 | map等于kmap_atomic(page)加offset |
3706 | map减等于1 |
3709 | 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.(map) |
3720 | out : |
3721 | 自旋锁解锁 |
3722 | 返回:ret |
名称 | 描述 |
---|---|
__swap_entry_free_locked | |
__swap_duplicate | Verify that a swap entry is valid and increment its swap map count.* Returns error code in following case.* - success -> 0* - swp_entry is invalid -> EINVAL* - swp_entry is migration entry -> EINVAL |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |