函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:memory_failure_hugetlb

函数原型:static int memory_failure_hugetlb(unsigned long pfn, int flags)

返回类型:int

参数:

类型参数名称
unsigned longpfn
intflags
1072  p等于pfn_to_page(pfn)
1073  head等于compound_head(p)
1077  如果TestSetPageHWPoison(head)则
1078  打印错误信息("Memory failure: %#lx: already hardware poisoned\n", pfn)
1080  返回:0
1083  num_poisoned_pages_inc()
1085  如果非flags按位与MF_COUNT_INCREASED的值且非get_hwpoison_page() - Get refcount for memory error handling:*@page: raw error page (hit by memory error)* Return: return 0 if failed to grab the refcount, otherwise true (some* non-zero value.)
1089  lock_page may only be called if we have the page's inode pinned.
1090  如果PageHWPoison(head)则
1098  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.
1099  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
1100  "Dirty/Clean" indication is not 100% accurate due to the possibility of* setting PG_dirty outside page lock. See also comment above set_page_dirty().
1101  返回:0
1104  lock_page may only be called if we have the page's inode pinned.
1105  page_flags等于体系结构无关页的属性
1107  如果非PageHWPoison(head)则
1108  打印错误信息("Memory failure: %#lx: just unpoisoned\n", pfn)
1109  num_poisoned_pages_dec()
1110  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.
1111  put_hwpoison_page(head)
1112  返回:0
1124  如果huge_page_size(page_hstate(head))大于PMD_SIZE
1125  "Dirty/Clean" indication is not 100% accurate due to the possibility of* setting PG_dirty outside page lock. See also comment above set_page_dirty().
1126  res等于负EBUSY
1127  转到:out
1130  如果非Do all that is necessary to remove user space mappings. Unmap* the pages and send SIGBUS to the processes if the data was dirty.
1131  "Dirty/Clean" indication is not 100% accurate due to the possibility of* setting PG_dirty outside page lock. See also comment above set_page_dirty().
1132  res等于负EBUSY
1133  转到:out
1136  res等于identify_page_state(pfn, p, page_flags)
1137  out :
1138  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.
1139  返回:res
调用者
名称描述
memory_failurememory_failure - Handle memory failure of a page.*@pfn: Page Number of the corrupted page*@flags: fine tune action taken* This function is called by the low level machine check code* of an architecture when it detects hardware memory corruption* of a page