函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swapfile.c Create Date:2022-07-27 16:47:16
Last Modify:2020-03-17 22:19:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:swap_range_free

函数原型:static void swap_range_free(struct swap_info_struct *si, unsigned long offset, unsigned int nr_entries)

返回类型:void

参数:

类型参数名称
struct swap_info_struct *si
unsigned longoffset
unsigned intnr_entries
705  end等于offsetnr_entries减1
706  void( * swap_slot_free_notify)(struct block_device * , unsigned long)
708  如果offset小于dex of first free in swap_map dex of first free in swap_map 等于offset
710  如果end大于dex of last free in swap_map
711  was_full等于非dex of last free in swap_map
713  dex of last free in swap_map 等于end
714  如果was_fullSWP_USED etc: see above 按位与SWP_WRITEOKadd_to_avail_list(si)
717  atomic_long_add(nr_entries, & nr_swap_pages)
718  umber of those currently in use 减等于nr_entries
719  如果SWP_USED etc: see above 按位与SWP_BLKDEVswap_slot_free_notify等于swap_slot_free_notify
722  否则swap_slot_free_notify = NULL
724 offset小于等于end循环
725  frontswap_invalidate_page(strange name for an index , offset)
726  如果swap_slot_free_notifyswap_slot_free_notify(swap device or bdev of swap file , offset)
728  offset自加
调用者
名称描述
swap_free_cluster
swap_entry_free