hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8S9BY CVE: NA
--------------------------------
Add a new page_type PG_dpool to represent the free page in dpool.
Signed-off-by: Liu Shixin liushixin2@huawei.com --- include/linux/page-flags.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 5c02720c53a5..e5cbffddf06d 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -921,6 +921,9 @@ static inline bool is_page_hwpoison(struct page *page) #define PG_offline 0x00000100 #define PG_table 0x00000200 #define PG_guard 0x00000400 +#ifdef CONFIG_DYNAMIC_POOL +#define PG_dpool 0x00000800 +#endif
#define PageType(page, flag) \ ((page->page_type & (PAGE_TYPE_BASE | flag)) == PAGE_TYPE_BASE) @@ -1012,6 +1015,13 @@ PAGE_TYPE_OPS(Table, table, pgtable) */ PAGE_TYPE_OPS(Guard, guard, guard)
+#ifdef CONFIG_DYNAMIC_POOL +/* + * PageDpool() indicates that the page is free and in the dpool. + */ +PAGE_TYPE_OPS(Dpool, dpool, dpool) +#endif + extern bool is_free_buddy_page(struct page *page);
PAGEFLAG(Isolated, isolated, PF_ANY);