函数逻辑报告 |
Source Code:mm\swapfile.c |
Create Date:2022-07-27 16:48:25 |
| Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:page_trans_huge_map_swapcount
函数原型:static int page_trans_huge_map_swapcount(struct page *page, int *total_mapcount, int *total_swapcount)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct page * | page | |
| int * | total_mapcount | |
| int * | total_swapcount |
| 1585 | offset等于0 |
| 1587 | struct swap_cluster_info * ci = NULL |
| 1588 | unsigned char * map = NULL |
| 1589 | swapcount等于0 |
| 1592 | VM_BUG_ON_PAGE(PageHuge(page), page) |
| 1598 | 如果total_swapcount则total_swapcount等于swapcount |
| 1603 | page等于compound_head(page) |
| 1605 | _total_mapcount等于_total_swapcount等于map_swapcount等于0 |
| 1606 | 如果PageSwapCache(page)则 |
| 1616 | 如果map则ci等于lock_cluster(si, offset) |
| 1618 | 以i小于HPAGE_PMD_NR循环 |
| 1619 | mapcount等于atomic_read( & * If the page can be mapped to userspace, encodes the number * of times this page is referenced by a page table.)加1 |
| 1620 | _total_mapcount加等于mapcount |
| 1621 | 如果map则 |
| 1622 | swapcount等于swap_count(map[offset + i]) |
| 1623 | _total_swapcount加等于swapcount |
| 1625 | map_swapcount等于两数取大(map_swapcount, mapcount + swapcount) |
| 1627 | unlock_cluster(ci) |
| 1629 | map_swapcount减等于1 |
| 1630 | _total_mapcount减等于HPAGE_PMD_NR |
| 1632 | mapcount等于compound_mapcount(page) |
| 1633 | map_swapcount加等于mapcount |
| 1634 | _total_mapcount加等于mapcount |
| 1640 | 返回:map_swapcount |
| 名称 | 描述 |
|---|---|
| reuse_swap_page | We can write to an anon page without COW if there are no other references* to it. And as a side-effect, free up its swap: because the old content* on disk will never be read, and seeking back there to write new content |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |