Commit 226133ee authored by Liu Shixin's avatar Liu Shixin Committed by Zheng Zengkai
Browse files

mm/dynamic_hugetlb: add PG_pool flag to mark pages from dhugetlb_pool

hulk inclusion
category: feature
bugzilla: 46904, https://gitee.com/openeuler/kernel/issues/I4QSHG


CVE: NA

--------------------------------

PG_pool is used to identify whether a page is belonging to a hugetlb_pool.

Signed-off-by: default avatarLiu Shixin <liushixin2@hauwei.com>
Reviewed-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent a8a836a3
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -139,6 +139,7 @@ enum pageflags {
#ifdef CONFIG_64BIT
	PG_arch_2,
#endif
	PG_pool,		/* Used to track page allocated from dynamic hugetlb pool */

	/* Add reserved page flags for internal extension. For the new page
	 * flags which backported from kernel upstream, please place them
@@ -461,6 +462,11 @@ PAGEFLAG(Idle, idle, PF_ANY)
 */
__PAGEFLAG(Reported, reported, PF_NO_COMPOUND)

/*
 * PagePool() is used to track page allocated from hpool.
 */
PAGEFLAG(Pool, pool, PF_NO_TAIL)

/*
 * On an anonymous page mapped into a user virtual memory area,
 * page->mapping points to its anon_vma, not to a struct address_space;
+2 −1
Original line number Diff line number Diff line
@@ -108,7 +108,8 @@
	{1UL << PG_mappedtodisk,	"mappedtodisk"	},		\
	{1UL << PG_reclaim,		"reclaim"	},		\
	{1UL << PG_swapbacked,		"swapbacked"	},		\
	{1UL << PG_unevictable,		"unevictable"	}		\
	{1UL << PG_unevictable,		"unevictable"	},		\
	{1UL << PG_pool,		"pool"		}		\
IF_HAVE_PG_MLOCK(PG_mlocked,		"mlocked"	)		\
IF_HAVE_PG_UNCACHED(PG_uncached,	"uncached"	)		\
IF_HAVE_PG_HWPOISON(PG_hwpoison,	"hwpoison"	)		\