Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:We may have stale swap cache pages in memory: notice* them here and get rid of the unnecessary final write.

Proto:int swap_writepage(struct page *page, struct writeback_control *wbc)

Type:int

Parameter:

TypeParameterName
struct page *page
struct writeback_control *wbc
247  ret = 0
249  If try_to_free_swap(page) Then
250  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.
251  Go to out
253  If frontswap_store(page) == 0 Then
254  set_page_writeback(page)
255  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.
256  d_page_writeback - end writeback against a page*@page: the page
257  Go to out
259  ret = __swap_writepage(page, wbc, end_swap_bio_write)
260  out :
261  Return ret