Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:get_any_page

Proto:static int get_any_page(struct page *page, unsigned long pfn, int flags)

Type:int

Parameter:

TypeParameterName
struct page *page
unsigned longpfn
intflags
1644  ret = Safely get reference count of an arbitrary page.* Returns 0 for a free page, -EIO for a zero refcount page* that is not free, and 1 for any other page type.* For 1 the page is returned with increased page count, otherwise not.
1646  If ret == 1 && Not PageHuge() only returns true for hugetlbfs pages, but not for normal or* transparent huge pages. See the PageTransHuge() documentation for more* details. && Not PageLRU(page) && Not __PageMovable(page) Then
1651  put_hwpoison_page(page)
1652  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.
1657  ret = Safely get reference count of an arbitrary page.* Returns 0 for a free page, -EIO for a zero refcount page* that is not free, and 1 for any other page type.* For 1 the page is returned with increased page count, otherwise not.
1658  If ret == 1 && Not PageLRU(page) Then
1663  Return -EIO
1666  Return ret
Caller
NameDescribe
soft_offline_pagesoft_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