函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:soft_offline_huge_page

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

返回类型:int

参数:

类型参数名称
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  如果PageHWPoison(hpage)则
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  打印信息("soft offline: %#lx hugepage already poisoned\n", pfn)
1685  返回:负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  如果非ret
1696  打印信息("soft offline: %#lx hugepage failed to isolate\n", pfn)
1697  返回:负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  如果ret
1703  打印信息("soft offline: %#lx: hugepage migration failed %d, type %lx (%pGp)\n", pfn, ret, 体系结构无关页的属性, & 体系结构无关页的属性)
1705  如果非链表为空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  如果ret大于0则ret等于负EIO
1709  否则
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  如果非ret
1721  否则ret等于负EBUSY
1725  返回:ret
调用者
名称描述
soft_offline_in_use_page