函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:If we are the only user, then try to free up the swap cache. * Its ok to check for PageSwapCache without the page lock* here because we are going to recheck again inside* try_to_free_swap() _with_ the lock.* - Marcelo

函数原型:static inline void free_swap_cache(struct page *page)

返回类型:void

参数:

类型参数名称
struct page *page
267  如果PageSwapCache(page)且非Return true if this page is mapped into pagetables.* For compound page it returns true if any subpage of compound page is mapped.Return true if the page was successfully locked
268  If swap is getting full, or if there are no more mappings of this page,* then try_to_free_swap is called to free its swap space.
269  lock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
调用者
名称描述
put_pagePerform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
free_pages_and_swap_cachePassed an array of pages, drop them all from swapcache and then release* them. They are removed from the LRU and freed if this is their last use.