Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swap_state.c Create Date:2022-07-28 15:14:35
Last Modify:2020-03-17 22:02:06 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static inline void free_swap_cache(struct page *page)

Type:void

Parameter:

TypeParameterName
struct page *page
267  If PageSwapCache(page) && Not 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 Then
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.
Caller
NameDescribe
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.