Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.)

Proto:int get_hwpoison_page(struct page *page)

Type:int

Parameter:

TypeParameterName
struct page *page
918  head = compound_head(page)
920  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
927  If Not PageAnon(head) Then
928  pr_err("Memory failure: %#lx: non anonymous thp\n", page_to_pfn(page))
930  Return 0
934  If Try to grab a ref unless the page has a refcount of zero, return false if* that is the case.* This can be called when MMU is off so it must not access* any of the virtual mappings. Then
935  If head == compound_head(page) Then Return 1
938  pr_info("Memory failure: %#lx cannot catch tail\n", page_to_pfn(page))
940  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
943  Return 0
Caller
NameDescribe
memory_failure_hugetlb
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
unpoison_memorypoison_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
__get_any_pageSafely get reference count of an arbitrary page.* Returns 0 for a free page, -EIO for a zero refcount page* that is not free, and 1 for any other page type.* For 1 the page is returned with increased page count, otherwise not.
hwpoison_inject