函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:memory_failure_dev_pagemap

函数原型:static int memory_failure_dev_pagemap(unsigned long pfn, int flags, struct dev_pagemap *pgmap)

返回类型:int

参数:

类型参数名称
unsigned longpfn
intflags
struct dev_pagemap *pgmap
1145  page等于pfn_to_page(pfn)
1146  const bool unmap_success = true
1147  size等于0
1149  LIST_HEAD(tokill)
1150  rc等于负EBUSY
1161  cookie等于dax_lock_page(page)
1162  如果非cookie则转到:out
1165  如果hwpoison_filter(page)则
1166  rc等于0
1167  转到:unlock
1170  如果type恒等于MEMORY_DEVICE_PRIVATE
1175  转到:unlock
1182  SetPageHWPoison(page)
1190  flags或等于MF_ACTION_REQUIRED按位或MF_MUST_KILL
1191  Collect the processes who have the corrupted page mapped to kill.
1193  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(tk, & tokill, nd)
1194  如果size_shiftsize等于两数取大(size, 1UL << size_shift)
1196  如果size
1203  start等于 Our offset within mapping. 左移PAGE_SHIFT determines the page size 位按位与size减1的差的反
1204  map_mapping_range - unmap the portion of all mmaps in the specified* address_space corresponding to the specified byte range in the underlying* file
1206  Kill the processes that have been collected earlier.* Only do anything when DOIT is set, otherwise just free the list* (this is used for clean pages which do not need killing)* Also when FAIL is set do a force kill because something went* wrong earlier.
1207  rc等于0
1208  unlock :
1209  dax_unlock_page(page, cookie)
1210  out :
1212  put_dev_pagemap(pgmap)
1213  "Dirty/Clean" indication is not 100% accurate due to the possibility of* setting PG_dirty outside page lock. See also comment above set_page_dirty().
1214  返回:rc
调用者
名称描述
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