Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memory-failure.c Create Date:2022-07-28 16:19:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:soft_offline_in_use_page

Proto:static int soft_offline_in_use_page(struct page *page, int flags)

Type:int

Parameter:

TypeParameterName
struct page *page
intflags
1812  hpage = compound_head(page)
1814  If Not PageHuge() only returns true for hugetlbfs pages, but not for normal or* transparent huge pages. See the PageTransHuge() documentation for more* details. && PageHuge() only returns true for hugetlbfs pages, but not for* normal or transparent huge pages.* PageTransHuge() returns true for both transparent huge and* hugetlbfs pages, but not normal pages. PageTransHuge() can only be Then
1815  lock_page may only be called if we have the page's inode pinned.
1818  If Not PageAnon(page) Then pr_info("soft offline: %#lx: non anonymous thp\n", page_to_pfn(page))
1820  Else pr_info("soft offline: %#lx: thp split failed\n", page_to_pfn(page))
1823  Return -EBUSY
1825  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.
1835  mt = get_pageblock_migratetype(page)
1836  set_pageblock_migratetype(page, MIGRATE_ISOLATE)
1837  If PageHuge() only returns true for hugetlbfs pages, but not for normal or* transparent huge pages. See the PageTransHuge() documentation for more* details. Then ret = soft_offline_huge_page(page, flags)
1839  Else ret = __soft_offline_page(page, flags)
1841  set_pageblock_migratetype(page, mt)
1842  Return ret
Caller
NameDescribe
soft_offline_pagesoft_offline_page - Soft offline a page.*@pfn: pfn to soft-offline*@flags: flags. Same as memory_failure().* Returns 0 on success, otherwise negated errno.* Soft offline a page, by migration or invalidation,* without killing anything