Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:soft_offline_page - Soft offline a page.*@pfn: pfn to soft-offline*@flags: flags. Same as memory_failure().* Returns 0 on success, otherwise negated errno.* Soft offline a page, by migration or invalidation,* without killing anything

Proto:int soft_offline_page(unsigned long pfn, int flags)

Type:int

Parameter:

TypeParameterName
unsigned longpfn
intflags
1885  If Not pfn_valid(pfn) Then Return -ENXIO
1888  page = Return page for the valid pfn only if the page is online. All pfn* walkers which rely on the fully initialized page->flags and others* should use this rather than pfn_valid && pfn_to_page(pfn)
1889  If Not page Then Return -EIO
1892  If PageHWPoison(page) Then
1893  pr_info("soft offline: %#lx page already poisoned\n", pfn)
1894  If flags & MF_COUNT_INCREASED Then put_hwpoison_page(page)
1896  Return -EBUSY
1899  get_online_mems()
1900  ret = get_any_page(page, pfn, flags)
1901  put_online_mems()
1903  If ret > 0 Then ret = soft_offline_in_use_page(page, flags)
1905  Else if ret == 0 Then ret = soft_offline_free_page(page)
1908  Return ret
Caller
NameDescribe
memory_failure_work_func