Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1177099

[PATCH] sched,fair: Remove > u32 weight handling for delta

Path csiph.com!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod
From Afzal Mohammed <afzal.mohd.ma@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] sched,fair: Remove > u32 weight handling for delta
Date Mon, 06 Jul 2015 04:50:01 +0200
Message-ID <pJ4DL-2ri-3@gated-at.bofh.it> (permalink)
X-Original-To linux-kernel@vger.kernel.org
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=Rk+g4E+IcwcyBMmV6gi6kwVL0RF91MJXAQ9xy2O462A=; b=woCgfNzY+/6fiLwFjuZK8TApldXHW/P1Pj1bxmyetwM7BNnBsuG7cDSo6Y22EC1Mwb jgy00Sryefe/aTacSlqWU0ZrUjHuiXXcB5l83HbkW/lvFzkPE9PXe3zD/7g6ssrxyWLE cU1UJ3tMDGGbJ5jkw6VE9GL2KmqUwZ1aRE+Hj1QmAkwoDRmvp6wpkJMgHRCXYxBGpJlt Ys2rSMSJDwUUPaG5yebrLHuCVfq72RtFtghfqbG2YOxQZfO6s6mS0vGhkkoVX4eBiHyw U0zHkWA0KLqFJ7n1OwJ5MOMa8Z7DYu4eEdrciKpCIB7oxorpPMo/wISvD3VuW3vn26w0 1Tjg==
X-Received by 10.69.27.33 with SMTP id jd1mr99934667pbd.34.1436150729906; Sun, 05 Jul 2015 19:45:29 -0700 (PDT)
X-Mailer git-send-email 2.1.4
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 48
Organization linux.* mail to news gateway
X-Original-Cc Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>
X-Original-Date Mon, 6 Jul 2015 08:14:37 +0530
X-Original-Message-ID <1436150677-1818-1-git-send-email-afzal.mohd.ma@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1177099

Show key headers only | View raw


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 <afzal.mohd.ma@gmail.com>
---
    
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

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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] sched,fair: Remove > u32 weight handling for delta Afzal Mohammed <afzal.mohd.ma@gmail.com> - 2015-07-06 04:50 +0200

csiph-web