]> git.baikalelectronics.ru Git - kernel.git/commit
mm/page_alloc.c: remove unlikely() from the current_order test
authorZhang Yanfei <zhangyanfei@cn.fujitsu.com>
Mon, 8 Jul 2013 23:00:08 +0000 (16:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Jul 2013 17:33:22 +0000 (10:33 -0700)
commit2199c2c9de30990eef68d61a9d3ed11b5986cfb3
tree23bd3d638b69536f11360866013cc462e5788043
parent67118a9f0530f4f73e98fa006c21ddfbbf2ba659
mm/page_alloc.c: remove unlikely() from the current_order test

In __rmqueue_fallback(), current_order loops down from MAX_ORDER - 1 to
the order passed.  MAX_ORDER is typically 11 and pageblock_order is
typically 9 on x86.  Integer division truncates, so pageblock_order / 2
is 4.  For the first eight iterations, it's guaranteed that
current_order >= pageblock_order / 2 if it even gets that far!

So just remove the unlikely(), it's completely bogus.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Suggested-by: David Rientjes <rientjes@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c