Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:free_swap_slot

Proto:int free_swap_slot(swp_entry_t entry)

Type:int

Parameter:

TypeParameterName
swp_entry_tentry
282  cache = raw_cpu_ptr( & swp_slots)
283  If Value is more likely to compile time(use_swap_slot_cache && slots_ret) Then
284  spin_lock_irq( & protects slots_ret, n_ret )
286  If Not use_swap_slot_cache || Not slots_ret Then
288  Go to direct_free
290  If n_ret >= SWAP_SLOTS_CACHE_SIZE Then
298  n_ret = 0
300  slots_ret[n_ret++] = entry
301  spin_unlock_irq( & protects slots_ret, n_ret )
302  Else
303  direct_free :
304  swapcache_free_entries( & entry, 1)
307  Return 0
Caller
NameDescribe
put_swap_pageCalled after dropping swapcache to decrease refcnt to swap entries.