linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] mm, page_alloc: add likely macro to help compiler optimization
@ 2013-08-02  2:07 Joonsoo Kim
  2013-08-02  2:07 ` [PATCH 2/4] mm, migrate: allocation new page lazyily in unmap_and_move() Joonsoo Kim
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Joonsoo Kim @ 2013-08-02  2:07 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, linux-kernel, Joonsoo Kim, Minchan Kim, Johannes Weiner,
	Mel Gorman, Rik van Riel, Joonsoo Kim

We rarely allocate a page with ALLOC_NO_WATERMARKS and it is used
in slow path. For making fast path more faster, add likely macro to
help compiler optimization.

Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b100255..86ad44b 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1901,7 +1901,7 @@ zonelist_scan:
 			goto this_zone_full;
 
 		BUILD_BUG_ON(ALLOC_NO_WATERMARKS < NR_WMARK);
-		if (!(alloc_flags & ALLOC_NO_WATERMARKS)) {
+		if (likely(!(alloc_flags & ALLOC_NO_WATERMARKS))) {
 			unsigned long mark;
 			int ret;
 
-- 
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] 15+ messages in thread

end of thread, other threads:[~2013-08-05 20:52 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-02  2:07 [PATCH 1/4] mm, page_alloc: add likely macro to help compiler optimization Joonsoo Kim
2013-08-02  2:07 ` [PATCH 2/4] mm, migrate: allocation new page lazyily in unmap_and_move() Joonsoo Kim
2013-08-02 19:41   ` Johannes Weiner
2013-08-05  7:41     ` Joonsoo Kim
2013-08-02  2:07 ` [PATCH 3/4] mm: move pgtable related functions to right place Joonsoo Kim
2013-08-02  2:07 ` [PATCH 4/4] swap: clean-up #ifdef in page_mapping() Joonsoo Kim
2013-08-02 19:43   ` Johannes Weiner
2013-08-02 16:27 ` [PATCH 1/4] mm, page_alloc: add likely macro to help compiler optimization Michal Hocko
2013-08-02 20:47   ` Johannes Weiner
2013-08-02 21:36     ` Michal Hocko
2013-08-05  8:10       ` Joonsoo Kim
2013-08-05  8:50         ` Joonsoo Kim
2013-08-05  8:59           ` Michal Hocko
2013-08-05 20:52           ` Johannes Weiner
2013-08-02 19:26 ` Johannes Weiner

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