函数逻辑报告 |
Source Code:mm\swapfile.c |
Create Date:2022-07-27 16:48:01 |
| Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Called after dropping swapcache to decrease refcnt to swap entries.
函数原型:void put_swap_page(struct page *page, swp_entry_t entry)
返回类型:void
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct page * | page | |
| swp_entry_t | entry |
| 1327 | offset等于Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format |
| 1328 | idx等于offset除SWAPFILE_CLUSTER |
| 1332 | free_entries等于0 |
| 1334 | size等于Define swap_entry_size() as constant to let compiler to optimize* out some code if !CONFIG_THP_SWAP(hpage_nr_pages(page)) |
| 1336 | si等于_swap_info_get(entry) |
| 1337 | 如果非si则返回 |
| 1340 | ci等于Determine the locking method in use for this device. Return* swap_cluster_info if SSD-style cluster-based locking is in place. |
| 1341 | 如果size恒等于SWAPFILE_CLUSTER则 |
| 1342 | VM_BUG_ON(!cluster_is_huge(ci)) |
| 1344 | 以i小于SWAPFILE_CLUSTER循环 |
| 1346 | VM_BUG_ON(!(val & Flag page is cached, in first swap_map )) |
| 1347 | 如果val恒等于Flag page is cached, in first swap_map 则free_entries自加 |
| 1350 | cluster_clear_huge(ci) |
| 1351 | 如果free_entries恒等于SWAPFILE_CLUSTER则 |
| 1352 | unlock_cluster_or_swap_info(si, ci) |
| 1353 | 加自旋锁 |
| 1355 | swap_free_cluster(si, idx) |
| 1356 | 自旋锁解锁 |
| 1357 | 返回 |
| 1361 | 如果非__swap_entry_free_locked(si, offset + i, Flag page is cached, in first swap_map )则 |
| 1369 | unlock_cluster_or_swap_info(si, ci) |
| 名称 | 描述 |
|---|---|
| add_to_swap | add_to_swap - allocate swap space for a page*@page: page we want to move to swap* Allocate swap space for the page and add the page to the* swap cache. Caller needs to hold the page lock. |
| delete_from_swap_cache | This must be called only on pages that have* been verified to be in the swap cache and locked.* It will never put the page into the free list,* the caller has a reference on the page. |
| __read_swap_cache_async | |
| get_swap_page |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |