Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:truncate_error_page

Proto:static int truncate_error_page(struct page *p, unsigned long pfn, struct address_space *mapping)

Type:int

Parameter:

TypeParameterName
struct page *p
unsigned longpfn
struct address_space *mapping
582  ret = MF_FAILED
584  If error_remove_page Then
585  err = error_remove_page(mapping, p)
587  If err != 0 Then
588  pr_info("Memory failure: %#lx: Failed to punch page: %d\n", pfn, err)
592  pr_info("Memory failure: %#lx: failed to release buffers\n", pfn)
594  Else
595  ret = MF_RECOVERED
597  Else
602  If Safely invalidate one page from its pagecache mapping.* It only drops clean, unused pages. The page must be locked.* Returns 1 if the page is successfully invalidated, otherwise 0. Then ret = MF_RECOVERED
604  Else pr_info("Memory failure: %#lx: Failed to invalidate\n", pfn)
609  Return ret
Caller
NameDescribe
me_pagecache_cleanClean (or cleaned) page cache page.
me_huge_pageHuge pages. Needs work.* Issues:* - Error on hugepage is contained in hugepage unit (not in raw page unit.)* To narrow down kill region to one page, we need to break up pmd.