linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: page_alloc: remove branch operation in free_pages_prepare()
@ 2013-03-07  8:21 Joonsoo Kim
  2013-03-07 18:54 ` Hugh Dickins
  0 siblings, 1 reply; 6+ messages in thread
From: Joonsoo Kim @ 2013-03-07  8:21 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-mm, Joonsoo Kim, Hugh Dickins

When we found that the flag has a bit of PAGE_FLAGS_CHECK_AT_PREP,
we reset the flag. If we always reset the flag, we can reduce one
branch operation. So remove it.

Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 8fcced7..778f2a9 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -614,8 +614,7 @@ static inline int free_pages_check(struct page *page)
 		return 1;
 	}
 	page_nid_reset_last(page);
-	if (page->flags & PAGE_FLAGS_CHECK_AT_PREP)
-		page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP;
+	page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP;
 	return 0;
 }
 
-- 
1.7.9.5

--
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] 6+ messages in thread

end of thread, other threads:[~2013-03-13  8:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07  8:21 [PATCH] mm: page_alloc: remove branch operation in free_pages_prepare() Joonsoo Kim
2013-03-07 18:54 ` Hugh Dickins
2013-03-08  0:45   ` Joonsoo Kim
2013-03-08  2:01     ` Hugh Dickins
2013-03-09  3:54       ` Will Huck
2013-03-13  8:08       ` Joonsoo Kim

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