linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] mm: page_alloc: Add unlikely for MAX_ORDER check
@ 2013-07-28 14:48 SeungHun Lee
  2013-07-29 18:44 ` KOSAKI Motohiro
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: SeungHun Lee @ 2013-07-28 14:48 UTC (permalink / raw)
  To: linux-mm; +Cc: SeungHun Lee

"order >= MAX_ORDER" case is occur rarely.

So I add unlikely for this check.
---
 mm/page_alloc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b8475ed..e644cf5 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2408,7 +2408,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
 	 * be using allocators in order of preference for an area that is
 	 * too large.
 	 */
-	if (order >= MAX_ORDER) {
+	if (unlikely(order >= MAX_ORDER)) {
 		WARN_ON_ONCE(!(gfp_mask & __GFP_NOWARN));
 		return NULL;
 	}
-- 
1.7.0.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] 10+ messages in thread

end of thread, other threads:[~2013-07-31 14:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-28 14:48 [PATCH 2/2] mm: page_alloc: Add unlikely for MAX_ORDER check SeungHun Lee
2013-07-29 18:44 ` KOSAKI Motohiro
2013-07-29 22:11 ` David Rientjes
2013-07-29 22:26   ` zhouxinxing
2013-07-29 22:45 ` Dave Hansen
2013-07-30  0:36   ` Cody P Schafer
2013-07-30  0:41     ` Cody P Schafer
2013-07-30  1:20     ` Cody P Schafer
2013-07-30 16:43       ` Dave Hansen
2013-07-31 14:45         ` 이승훈

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