From: Liu Shixin liushixin2@huawei.com
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: Liu Shixin liushixin2@hauwei.com Reviewed-by: Kefeng Wang wangkefeng.wang@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- include/linux/page-flags.h | 6 ++++++ include/trace/events/mmflags.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 18dbfa2a7c5f..b47a5514ebc8 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -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; diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmflags.h index 30700ccb1eea..1a2896fc039e 100644 --- a/include/trace/events/mmflags.h +++ b/include/trace/events/mmflags.h @@ -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" ) \