linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mm/page_alloc: remove unnecessary order check in __alloc_pages_direct_compact
@ 2016-06-15  9:34 Ganesh Mahendran
  2016-06-15  9:40 ` Balbir Singh
  0 siblings, 1 reply; 4+ messages in thread
From: Ganesh Mahendran @ 2016-06-15  9:34 UTC (permalink / raw)
  To: linux-mm, linux-kernel
  Cc: akpm, vbabka, iamjoonsoo.kim, mhocko, mina86, minchan, khandual,
	Ganesh Mahendran

In the callee try_to_compact_pages(), the (order == 0) is checked,
so remove check in __alloc_pages_direct_compact.

Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
---
v2:
  remove the check in __alloc_pages_direct_compact - Anshuman Khandual
---
 mm/page_alloc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b9ea618..2f5a82a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3173,9 +3173,6 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order,
 	struct page *page;
 	int contended_compaction;
 
-	if (!order)
-		return NULL;
-
 	current->flags |= PF_MEMALLOC;
 	*compact_result = try_to_compact_pages(gfp_mask, order, alloc_flags, ac,
 						mode, &contended_compaction);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-15 16:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-15  9:34 [PATCH v2] mm/page_alloc: remove unnecessary order check in __alloc_pages_direct_compact Ganesh Mahendran
2016-06-15  9:40 ` Balbir Singh
2016-06-15  9:52   ` Vlastimil Babka
2016-06-15 16:41   ` Michal Nazarewicz

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).