Commit aeb5fd3e authored by Liu Shixin's avatar Liu Shixin
Browse files

mm/dynamic_pool: introduce PG_dpool to mark free pages in dpool

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: default avatarLiu Shixin <liushixin2@huawei.com>
parent 8822f347
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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);