Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:swap_range_free

Proto:static void swap_range_free(struct swap_info_struct *si, unsigned long offset, unsigned int nr_entries)

Type:void

Parameter:

TypeParameterName
struct swap_info_struct *si
unsigned longoffset
unsigned intnr_entries
705  end = offset + nr_entries - 1
706  void( * swap_slot_free_notify)(struct block_device * , unsigned long)
708  If offset < dex of first free in swap_map Then dex of first free in swap_map = offset
710  If end > dex of last free in swap_map Then
711  was_full = Not dex of last free in swap_map
713  dex of last free in swap_map = end
714  If was_full && SWP_USED etc: see above & SWP_WRITEOK Then add_to_avail_list(si)
717  atomic_long_add(nr_entries, & nr_swap_pages)
718  umber of those currently in use -= nr_entries
719  If SWP_USED etc: see above & SWP_BLKDEV Then swap_slot_free_notify = swap_slot_free_notify
722  Else swap_slot_free_notify = NULL
724  When offset <= end cycle
725  frontswap_invalidate_page(strange name for an index , offset)
726  If swap_slot_free_notify Then swap_slot_free_notify(swap device or bdev of swap file , offset)
728  offset++
Caller
NameDescribe
swap_free_cluster
swap_entry_free