Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\frontswap.c Create Date:2022-07-28 15:21:26
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:"Get" data from frontswap associated with swaptype and offset that were* specified when the data was put to frontswap and use it to fill the* specified page with data. Page must be locked and in the swap cache.

Proto:int __frontswap_load(struct page *page)

Type:int

Parameter:

TypeParameterName
struct page *page
296  ret = -1
297  swp_entry_t entry = {val = page_private(page), }
298  type = Extract the `type' field from a swp_entry_t. The swp_entry_t is in* arch-independent format
299  sis = swap_info[type]
300  offset = Extract the `offset' field from a swp_entry_t. The swp_entry_t is in* arch-independent format
303  VM_BUG_ON(!swap_ops are added by frontswap_register_ops, and provide the* frontswap "backend" implementation functions. Multiple implementations* may be registered, but implementations can never deregister. This)
304  VM_BUG_ON(!PageLocked(page))
305  VM_BUG_ON(sis == NULL)
307  If Not __frontswap_test(sis, offset) Then Return -1
312  ret = load(type, offset, page)
313  If Not ret Then Break
316  If ret == 0 Then
317  inc_frontswap_loads()
323  Return ret