Function report |
Source Code:mm\swapfile.c |
Create Date:2022-07-28 15:17:29 |
| Last Modify:2020-03-17 22:19:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Check whether swap entry is valid in the swap device
Proto:struct swap_info_struct *get_swap_device(swp_entry_t entry)
Type:struct swap_info_struct
Parameter:
| Type | Parameter | Name |
|---|---|---|
| swp_entry_t | entry |
| 1256 | si = swp_swap_info(entry) |
| 1257 | If Not si Then Go to bad_nofile |
| 1261 | If Not (SWP_USED etc: see above & SWP_VALID) Then Go to unlock_out |
| 1263 | offset = Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format |
| 1264 | If offset >= xtent of the swap_map Then Go to unlock_out |
| 1267 | Return si |
| 1268 | bad_nofile : |
| 1270 | out : |
| 1271 | Return NULL |
| 1272 | unlock_out : |
| 1274 | Return NULL |
| Name | Describe |
|---|---|
| total_swapcache_pages | |
| lookup_swap_cache | 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. |
| __read_swap_cache_async | |
| __swap_count | |
| __swp_swapcount | How many references to @entry are currently swapped out?* This does not give an exact answer when swap count is continued,* but does include the high COUNT_CONTINUED flag to allow for that. |
| __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 |
| add_swap_count_continuation | 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 |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |