Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:soft_offline_huge_page

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

Type:int

Parameter:

TypeParameterName
struct page *page
intflags
1672  pfn = page_to_pfn(page)
1673  hpage = compound_head(page)
1674  LIST_HEAD(pagelist)
1680  lock_page may only be called if we have the page's inode pinned.
1681  If PageHWPoison(hpage) Then
1682  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.
1683  put_hwpoison_page(hpage)
1684  pr_info("soft offline: %#lx hugepage already poisoned\n", pfn)
1685  Return -EBUSY
1687  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.
1689  ret = isolate_huge_page(hpage, & pagelist)
1694  put_hwpoison_page(hpage)
1695  If Not ret Then
1696  pr_info("soft offline: %#lx hugepage failed to isolate\n", pfn)
1697  Return -EBUSY
1700  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
1702  If ret Then
1703  pr_info("soft offline: %#lx: hugepage migration failed %d, type %lx (%pGp)\n", pfn, ret, Atomic flags, some possibly * updated asynchronously , & Atomic flags, some possibly * updated asynchronously )
1705  If Not list_empty - tests whether a list is empty*@head: the list to test. Then Put previously isolated pages back onto the appropriate lists* from where they were once taken off for compaction/migration.* This function shall be used whenever the isolated pageset has been* built from lru, balloon, hugetlbfs page
1707  If ret > 0 Then ret = -EIO
1709  Else
1717  ret = Dissolve a given free hugepage into free buddy pages. This function does* nothing for in-use hugepages and non-hugepages.* This function returns values like below:* -EBUSY: failed to dissolved free hugepages or the hugepage is in-use
1718  If Not ret Then
1721  Else ret = -EBUSY
1725  Return ret
Caller
NameDescribe
soft_offline_in_use_page