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

mm/dynamic_pool: Stop alloc reliable page from dynamic pool

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I9CDZZ



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

With memory reliable enabled, user expect to alloc memory from mirrored
regions (also known as the non-movable zone). However dynamic pool does
not contain such reliable information. So bypass it.

Signed-off-by: default avatarLiu Shixin <liushixin2@huawei.com>
parent 398d8373
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -700,6 +700,11 @@ static bool dpool_should_alloc(gfp_t gfp_mask, unsigned int order)
	if ((gfp | __GFP_IO | __GFP_FS) != GFP_HIGHUSER_MOVABLE)
		return false;

#ifdef CONFIG_MEMORY_RELIABLE
	if (mem_reliable_is_enabled() && (gfp_mask & GFP_RELIABLE))
		return false;
#endif

	return true;
}