]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/page_alloc.c: remove unlikely() from the current_order test
authorZhang Yanfei <zhangyanfei@cn.fujitsu.com>
Wed, 19 Jun 2013 00:07:02 +0000 (10:07 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:26:54 +0000 (17:26 +1000)
commitd35d6eafce8d94362223a693659bf0f83f613f74
tree8f14e085f35c77311d0d89e87ae6fc4f2cd81c1c
parent55fe5f879d109ba081aa2808b7e4bf1156ec7e73
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>
mm/page_alloc.c