linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: balloon: enqueue zero page to balloon device
@ 2017-06-29  1:10 zhenwei.pi
  0 siblings, 0 replies; only message in thread
From: zhenwei.pi @ 2017-06-29  1:10 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, gi-oh.kim, vbabka, zhenwei.pi

Now, pages in balloon device have random value, and these pages
will be scanned by ksmd on host. They usually can not be merged.
Enqueue zero page will resolve this problem.

Signed-off-by: zhenwei.pi <zhenwei.pi@youruncloud.com>
---
 mm/balloon_compaction.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c
index da91df5..c29ebdc 100644
--- a/mm/balloon_compaction.c
+++ b/mm/balloon_compaction.c
@@ -24,7 +24,7 @@ struct page *balloon_page_enqueue(struct balloon_dev_info *b_dev_info)
 {
 	unsigned long flags;
 	struct page *page = alloc_page(balloon_mapping_gfp_mask() |
-					__GFP_NOMEMALLOC | __GFP_NORETRY);
+					__GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_ZERO);
 	if (!page)
 		return NULL;
 
-- 
2.7.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-29  1:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29  1:10 [PATCH] mm: balloon: enqueue zero page to balloon device zhenwei.pi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).