scaled down weight 'fact' would not be > u32 rather than unlikely as the weight being passed in __calc_delta() is either 'se->load.weight' or NICE_O_LOAD. 'se->load.weight' would be one of the values of prio_to_weight[] in the case of task, while in the case of task group it would be capped to MAX_SHARES. All those possible values can fit in u32. Hence remove the initial > u32 handling on 'fact'.
Signed-off-by: Afzal Mohammed <afzal.mohd...@gmail.com> --- v2: expand change log on why weight can fit in u32, remove incorrect comments. kernel/sched/fair.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 65c8f3ebdc3c..22cf3958bbac 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -218,13 +218,6 @@ static u64 __calc_delta(u64 delta_exec, unsigned long weight, struct load_weight __update_inv_weight(lw); - if (unlikely(fact >> 32)) { - while (fact >> 32) { - fact >>= 1; - shift--; - } - } - /* hint to use a 32x32->64 mul */ fact = (u64)(u32)fact * lw->inv_weight; -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/