Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Determine the locking method in use for this device. Return* swap_cluster_info if SSD-style cluster-based locking is in place.

Proto:static inline struct swap_cluster_info *lock_cluster_or_swap_info(struct swap_info_struct *si, unsigned long offset)

Type:struct swap_cluster_info

Parameter:

TypeParameterName
struct swap_info_struct *si
unsigned longoffset
367  ci = lock_cluster(si, offset)
369  If Not ci Then spin_lock( & protect map scan related fields like* swap_map, lowest_bit, highest_bit,* inuse_pages, cluster_next,* cluster_nr, lowest_alloc,* highest_alloc, free/discard cluster* list. other fields are only changed* at swapon/swapoff, so are protected* by swap_lock)
372  Return ci
Caller
NameDescribe
__swap_entry_free
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.
swap_swapcount
swp_swapcountHow many references to @entry are currently swapped out?* This considers COUNT_CONTINUED so it returns exact answer.
swap_page_trans_huge_swapped
__swap_duplicateVerify 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