From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756729AbcANV1W (ORCPT ); Thu, 14 Jan 2016 16:27:22 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:57730 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756645AbcANV1Q (ORCPT ); Thu, 14 Jan 2016 16:27:16 -0500 Date: Thu, 14 Jan 2016 22:27:04 +0100 From: Peter Zijlstra To: Dietmar Eggemann Cc: Frederic Weisbecker , LKML , Byungchul Park , Chris Metcalf , Thomas Gleixner , Luiz Capitulino , Christoph Lameter , "Paul E . McKenney" , Mike Galbraith , Rik van Riel Subject: Re: [RFC PATCH 0/4] sched: Improve cpu load accounting with nohz Message-ID: <20160114212704.GJ6357@twins.programming.kicks-ass.net> References: <1452700891-21807-1-git-send-email-fweisbec@gmail.com> <569810C4.7090900@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <569810C4.7090900@arm.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 14, 2016 at 09:19:00PM +0000, Dietmar Eggemann wrote: > @@ -4346,7 +4346,10 @@ static void __update_cpu_load(struct rq *this_rq, unsigned long this_load, > > /* scale is effectively 1 << i now, and >> i divides by scale */ > > - old_load = this_rq->cpu_load[i] - tickless_load; > + if (this_rq->cpu_load[i] > tickless_load) > + old_load = this_rq->cpu_load[i] - tickless_load; > + else > + old_load = 0; Yeah, yuck. That'd go bad quick.