Function report |
Source Code:mm\memory-failure.c |
Create Date:2022-07-28 16:19:41 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:int unpoison_memory(unsigned long pfn)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
unsigned long | pfn |
1523 | freeit = 0 |
1530 | p = pfn_to_page(pfn) |
1531 | page = compound_head(p) |
1533 | If Not PageHWPoison(p) Then |
1534 | unpoison_pr_info("Unpoison: Page was already unpoisoned %#lx\n", pfn, & unpoison_rs) |
1536 | Return 0 |
1539 | If page_count(page) > 1 Then |
1540 | unpoison_pr_info("Unpoison: Someone grabs the hwpoison page %#lx\n", pfn, & unpoison_rs) |
1542 | Return 0 |
1546 | unpoison_pr_info("Unpoison: Someone maps the hwpoison page %#lx\n", pfn, & unpoison_rs) |
1548 | Return 0 |
1551 | If page_mapping(page) Then |
1552 | unpoison_pr_info("Unpoison: the hwpoison page has non-NULL mapping %#lx\n", pfn, & unpoison_rs) |
1554 | Return 0 |
1563 | unpoison_pr_info("Unpoison: Memory failure is now running on %#lx\n", pfn, & unpoison_rs) |
1565 | Return 0 |
1569 | If TestClearPageHWPoison(p) Then num_poisoned_pages_dec() |
1571 | unpoison_pr_info("Unpoison: Software-unpoisoned free page %#lx\n", pfn, & unpoison_rs) |
1573 | Return 0 |
1583 | If TestClearPageHWPoison(page) Then |
1584 | unpoison_pr_info("Unpoison: Software-unpoisoned page %#lx\n", pfn, & unpoison_rs) |
1586 | num_poisoned_pages_dec() |
1587 | freeit = 1 |
1591 | put_hwpoison_page(page) |
1592 | If freeit && Not ( pfn == my_zero_pfn(0) && page_count(p) == 1 ) Then put_hwpoison_page(page) |
1595 | Return 0 |
Name | Describe |
---|---|
hwpoison_unpoison |
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 |