Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:check_new_page_bad

Proto:static void check_new_page_bad(struct page *page)

Type:void

Parameter:

TypeParameterName
struct page *page
2044  const char * bad_reason = NULL
2045  bad_flags = 0
2047  If Value for the false possibility is greater at compile time(atomic_read( & * If the page can be mapped to userspace, encodes the number * of times this page is referenced by a page table.) != - 1) Then bad_reason = "nonzero mapcount"
2049  If Value for the false possibility is greater at compile time( See page-flags.h for PAGE_MAPPING_FLAGS != NULL) Then bad_reason = "non-NULL mapping"
2051  If Value for the false possibility is greater at compile time(page_ref_count(page) != 0) Then bad_reason = "nonzero _refcount"
2053  If Value for the false possibility is greater at compile time( Atomic flags, some possibly * updated asynchronously & __PG_HWPOISON) Then
2054  bad_reason = "HWPoisoned (hardware-corrupted)"
2055  bad_flags = __PG_HWPOISON
2057  The atomic page->_mapcount, starts from -1: so that transitions* both from it and to it can be tracked, using atomic_inc_and_test* and atomic_add_negative(-1).
2058  Return
2060  If Value for the false possibility is greater at compile time( Atomic flags, some possibly * updated asynchronously & Flags checked when a page is prepped for return by the page allocator) Then
2061  bad_reason = "PAGE_FLAGS_CHECK_AT_PREP flag set"
2062  bad_flags = Flags checked when a page is prepped for return by the page allocator
2065  If Value for the false possibility is greater at compile time(mem_cgroup) Then bad_reason = "page still charged to cgroup"
2068  bad_page(page, bad_reason, bad_flags)
Caller
NameDescribe
check_new_pageThis page is about to be returned from the page allocator