Skip to content

Commit af54aed

Browse files
wei-w-wangtorvalds
authored andcommitted
mm/balloon_compaction.c: don't zero ballooned pages
Revert commit bb01b64 ("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: bb01b64 ("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>
1 parent c0a6a5a commit af54aed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mm/balloon_compaction.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct page *balloon_page_enqueue(struct balloon_dev_info *b_dev_info)
2424
{
2525
unsigned long flags;
2626
struct page *page = alloc_page(balloon_mapping_gfp_mask() |
27-
__GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_ZERO);
27+
__GFP_NOMEMALLOC | __GFP_NORETRY);
2828
if (!page)
2929
return NULL;
3030

0 commit comments

Comments
 (0)