summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorWei Wang <wei.w.wang@intel.com>2017-08-10 15:24:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-08-10 15:54:07 -0700
commitaf54aed94bf3a1cf0b847bbbf00f9a58e278b338 (patch)
tree4850a7f52d1b3695ee750dc6c500b765a73a39a6 /mm
parentc0a6a5ae6b5d976592a83bdafc1c2f49b0718c65 (diff)
downloadlinux-af54aed94bf3a1cf0b847bbbf00f9a58e278b338.tar.gz
linux-af54aed94bf3a1cf0b847bbbf00f9a58e278b338.tar.bz2
linux-af54aed94bf3a1cf0b847bbbf00f9a58e278b338.zip
mm/balloon_compaction.c: don't zero ballooned pages
Revert commit bb01b64cfab7 ("mm/balloon_compaction.c: enqueue zero page to balloon device")' Zeroing ballon pages is rather time consuming, especially when a lot of pages are in flight. E.g. 7GB worth of ballooned memory takes 2.8s with __GFP_ZERO while it takes ~491ms without it. The original commit argued that zeroing will help ksmd to merge these pages on the host but this argument is assuming that the host actually marks balloon pages for ksm which is not universally true. So we pay performance penalty for something that even might not be used in the end which is wrong. The host can zero out pages on its own when there is a need. [mhocko@kernel.org: new changelog text] Link: http://lkml.kernel.org/r/1501761557-9758-1-git-send-email-wei.w.wang@intel.com Fixes: bb01b64cfab7 ("mm/balloon_compaction.c: enqueue zero page to balloon device") Signed-off-by: Wei Wang <wei.w.wang@intel.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: zhenwei.pi <zhenwei.pi@youruncloud.com> Cc: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/balloon_compaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c
index 9075aa54e955..b06d9fe23a28 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_ZERO);
+ __GFP_NOMEMALLOC | __GFP_NORETRY);
if (!page)
return NULL;