函数逻辑报告 |
Source Code:mm\swapfile.c |
Create Date:2022-07-27 16:50:45 |
Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:add_swap_count_continuation - called when a swap count is duplicated* beyond SWAP_MAP_MAX, it allocates a new page and links that to the entry's* page of the original vmalloc'ed swap_map, to hold the continuation count
函数原型:int add_swap_count_continuation(swp_entry_t entry, gfp_t gfp_mask)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
swp_entry_t | entry | |
gfp_t | gfp_mask |
3538 | ret等于0 |
3544 | page等于alloc_page(gfp_mask | __GFP_HIGHMEM) |
3547 | 如果非si则 |
3552 | 转到:outer |
3554 | 加自旋锁 |
3556 | offset等于Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format |
3558 | ci等于lock_cluster(si, offset) |
3568 | 转到:out |
3571 | 如果非page则 |
3584 | 加自旋锁 |
3589 | 如果非page_private(head)则 |
3591 | 初始化链表头 |
3592 | set_page_private(head, SWP_CONTINUED) |
3593 | SWP_USED etc: see above 或等于SWP_CONTINUED |
3603 | 如果非count按位与See swap_map continuation for full count 的值则转到:out_unlock_cont |
3606 | map等于kmap_atomic(list_page)加offset |
3618 | 添加链表项 |
3619 | page = NULL |
3620 | out_unlock_cont : |
3621 | 自旋锁解锁 |
3622 | out : |
3623 | unlock_cluster(ci) |
3624 | 自旋锁解锁 |
3625 | put_swap_device(si) |
3626 | outer : |
3627 | 如果page则__free_page(page) |
3629 | 返回:ret |
名称 | 描述 |
---|---|
swap_duplicate | Increase reference count of swap entry by 1 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |