From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753474AbbGFCpi (ORCPT ); Sun, 5 Jul 2015 22:45:38 -0400 Received: from mail-pd0-f171.google.com ([209.85.192.171]:33757 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbbGFCpa (ORCPT ); Sun, 5 Jul 2015 22:45:30 -0400 From: Afzal Mohammed To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , Peter Zijlstra Subject: [PATCH] sched,fair: Remove > u32 weight handling for delta Date: Mon, 6 Jul 2015 08:14:37 +0530 Message-Id: <1436150677-1818-1-git-send-email-afzal.mohd.ma@gmail.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org scaled down weight 'fact' would not be > u32 rather than unlikely as the values being passed for delta is either NICE_O_LOAD or the weight of the 'se' which would be a value that can be accomodated in a u32. Remove the initial > u32 handling on 'fact'. 9dbdb15553239 ("sched/fair: Rework sched_fair time accounting") in addition to fixing the original issue of time moving backwards elsewhere in the code, handled delta > u32 case (due to NO_HZ_FULL) which brought in as it's part the change changed here. The hunk being removed here would not make a difference to it as this is on scaled weight > u32. And pre-"9dbdb15553239" doesn't seem to have logical equivalent of hunk removed here either. Signed-off-by: Afzal Mohammed --- System here (that mainly does kernel build) has been running with this change for last couple of weeks without any issue observed. kernel/sched/fair.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 3d57cc0ca0a6..0cc58a7bdd16 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