Function report |
Source Code:mm\memory-failure.c |
Create Date:2022-07-28 16:19:08 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Do all that is necessary to remove user space mappings. Unmap* the pages and send SIGBUS to the processes if the data was dirty.
Proto:static bool hwpoison_user_mappings(struct page *p, unsigned long pfn, int flags, struct page **hpagep)
Type:bool
Parameter:
Type | Parameter | Name |
---|---|---|
struct page * | p | |
unsigned long | pfn | |
int | flags | |
struct page ** | hpagep |
954 | ttu = ignore mlock | don't age |
958 | kill = 1 |
960 | mlocked = PageMlocked(hpage) |
966 | If PageReserved(p) || PageSlab(p) Then Return true |
975 | If Not Return true if this page is mapped into pagetables.* For compound page it returns true if any subpage of compound page is mapped. Then Return true |
983 | If PageSwapCache(p) Then |
986 | ttu |= corrupted page is recoverable |
995 | mapping = page_mapping(hpage) |
996 | If Not (flags & MF_MUST_KILL) && Not PageDirty(hpage) && mapping && mapping_cap_writeback_dirty(mapping) Then |
998 | If page_mkclean(hpage) Then |
999 | SetPageDirty(hpage) |
1000 | Else |
1001 | kill = 0 |
1002 | ttu |= corrupted page is recoverable |
1020 | If Not unmap_success Then pr_err("Memory failure: %#lx: failed to unmap page (mapcount=%d)\n", pfn, page_mapcount(hpage)) |
1028 | If mlocked Then When a unknown page type is encountered drain as many buffers as possible* in the hope to turn the page into a LRU or free page, which we can handle. |
1041 | forcekill = PageDirty(hpage) || flags & MF_MUST_KILL |
1044 | Return unmap_success |
Name | Describe |
---|---|
memory_failure_hugetlb | |
memory_failure | memory_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 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |