函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memory-failure.c Create Date:2022-07-27 17:54:36
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__soft_offline_page

函数原型:static int __soft_offline_page(struct page *page, int flags)

返回类型:int

参数:

类型参数名称
struct page *page
intflags
1731  pfn等于page_to_pfn(page)
1739  lock_page may only be called if we have the page's inode pinned.
1740  Wait for a page to complete writeback
1741  如果PageHWPoison(page)则
1742  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.
1743  put_hwpoison_page(page)
1744  打印信息("soft offline: %#lx page already poisoned\n", pfn)
1745  返回:负EBUSY
1751  ret等于Safely invalidate one page from its pagecache mapping.* It only drops clean, unused pages. The page must be locked.* Returns 1 if the page is successfully invalidated, otherwise 0.
1752  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.
1757  如果ret恒等于1则
1758  put_hwpoison_page(page)
1759  打印信息("soft_offline: %#lx: invalidated\n", pfn)
1760  SetPageHWPoison(page)
1761  num_poisoned_pages_inc()
1762  返回:0
1770  如果PageLRU(page)则ret等于solate_lru_page - tries to isolate a page from its LRU list*@page: page to isolate from its LRU list* Isolates a @page from an LRU list, clears PageLRU and adjusts the* vmstat statistic corresponding to whatever LRU list the page was on.
1772  否则ret等于isolate_movable_page(page, Isolate unevictable pages )
1778  put_hwpoison_page(page)
1779  如果非ret
1780  LIST_HEAD(pagelist)
1786  如果非__PageMovable(page)则inc_node_page_state(page, Temporary isolated pages from anon lru + page_is_file_cache - should the page be on a file LRU or anon LRU?*@page: the page to test* Returns 1 if @page is page cache page backed by a regular filesystem,* or 0 if @page is anonymous, tmpfs or otherwise ram or swap backed)
1789  添加链表项
1790  ret等于migrate_pages - migrate the pages specified in a list, to the free pages* supplied as the target for the page migration*@from: The list of pages to be migrated.*@get_new_page: The function used to allocate free pages to be used
1792  如果ret
1796  打印信息("soft offline: %#lx: migration failed %d, type %lx (%pGp)\n", pfn, ret, 体系结构无关页的属性, & 体系结构无关页的属性)
1798  如果ret大于0则ret等于负EIO
1801  否则
1802  打印信息("soft offline: %#lx: isolation failed: %d, page count %d, type %lx (%pGp)\n", pfn, ret, page_count(page), 体系结构无关页的属性, & 体系结构无关页的属性)
1805  返回:ret
调用者
名称描述
soft_offline_in_use_page