Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swapfile.c Create Date:2022-07-28 15:17:23
Last Modify:2020-03-17 22:19:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:_swap_info_get

Proto:static struct swap_info_struct *_swap_info_get(swp_entry_t entry)

Type:struct swap_info_struct

Parameter:

TypeParameterName
swp_entry_tentry
1137  p = __swap_info_get(entry)
1138  If Not p Then Go to out
1140  If Not vmalloc'ed array of usage counts [Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format] Then Go to bad_free
1142  Return p
1144  bad_free :
1145  pr_err("swap_info_get: %s%08lx\n", Unused_offset, val)
1146  Go to out
1147  out :
1148  Return NULL
Caller
NameDescribe
swap_info_get
swap_info_get_cont
swap_freeCaller has made sure that the swap device corresponding to entry* is still around or has not been recycled.
put_swap_pageCalled after dropping swapcache to decrease refcnt to swap entries.
page_swapcountHow many references to page 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.
swp_swapcountHow many references to @entry are currently swapped out?* This considers COUNT_CONTINUED so it returns exact answer.
page_swapped
page_trans_huge_map_swapcount
free_swap_and_cacheFree the swap entry like above, but also try to* free the page cache entry if it is the last user.