函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:poison_memory - Unpoison a previously poisoned page*@pfn: Page number of the to be unpoisoned page* Software-unpoison a page that has been poisoned by* memory_failure() earlier

函数原型:int unpoison_memory(unsigned long pfn)

返回类型:int

参数:

类型参数名称
unsigned longpfn
1523  freeit等于0
1524  DEFINE_RATELIMIT_STATE(unpoison_rs, DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST)
1527  如果非pfn_valid(pfn)则返回:负ENXIO
1530  p等于pfn_to_page(pfn)
1531  page等于compound_head(p)
1533  如果非PageHWPoison(p)则
1534  unpoison_pr_info("Unpoison: Page was already unpoisoned %#lx\n", pfn, & unpoison_rs)
1536  返回:0
1539  如果page_count(page)大于1则
1540  unpoison_pr_info("Unpoison: Someone grabs the hwpoison page %#lx\n", pfn, & unpoison_rs)
1542  返回:0
1545  如果Return true if this page is mapped into pagetables.* For compound page it returns true if any subpage of compound page is mapped.
1546  unpoison_pr_info("Unpoison: Someone maps the hwpoison page %#lx\n", pfn, & unpoison_rs)
1548  返回:0
1551  如果page_mapping(page)则
1552  unpoison_pr_info("Unpoison: the hwpoison page has non-NULL mapping %#lx\n", pfn, & unpoison_rs)
1554  返回:0
1562  如果非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
1563  unpoison_pr_info("Unpoison: Memory failure is now running on %#lx\n", pfn, & unpoison_rs)
1565  返回:0
1568  如果非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.)
1569  如果TestClearPageHWPoison(p)则num_poisoned_pages_dec()
1571  unpoison_pr_info("Unpoison: Software-unpoisoned free page %#lx\n", pfn, & unpoison_rs)
1573  返回:0
1576  lock_page may only be called if we have the page's inode pinned.
1583  如果TestClearPageHWPoison(page)则
1584  unpoison_pr_info("Unpoison: Software-unpoisoned page %#lx\n", pfn, & unpoison_rs)
1586  num_poisoned_pages_dec()
1587  freeit等于1
1589  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.
1591  put_hwpoison_page(page)
1592  如果freeit且非pfn恒等于my_zero_pfn(0)且page_count(p)恒等于1的值则put_hwpoison_page(page)
1595  返回:0
调用者
名称描述
hwpoison_unpoison