Re: [PATCH] mm: Remove unlikely from the current_order test

From: David Rientjes
Date: Mon Jun 17 2013 - 19:56:23 EST


On Tue, 18 Jun 2013, Zhang Yanfei wrote:

> From: Zhang Yanfei <zhangyanfei@xxxxxxxxxxxxxx>
>
> 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.
>
> Suggested-by: David Rientjes <rientjes@xxxxxxxxxx>
> Signed-off-by: Zhang Yanfei <zhangyanfei@xxxxxxxxxxxxxx>

Acked-by: David Rientjes <rientjes@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/