Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934448AbcDMIh4 (ORCPT ); Wed, 13 Apr 2016 04:37:56 -0400 Received: from foss.arm.com ([217.140.101.70]:60740 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932482AbcDMIhy (ORCPT ); Wed, 13 Apr 2016 04:37:54 -0400 Date: Wed, 13 Apr 2016 09:40:38 +0100 From: Morten Rasmussen To: Yuyang Du Cc: Dietmar Eggemann , peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, bsegall@google.com, pjt@google.com, vincent.guittot@linaro.org, juri.lelli@arm.com Subject: Re: [PATCH 2/4] sched/fair: Drop out incomplete current period when sched averages accrue Message-ID: <20160413084037.GG18516@e105550-lin.cambridge.arm.com> References: <1460327765-18024-1-git-send-email-yuyang.du@intel.com> <1460327765-18024-3-git-send-email-yuyang.du@intel.com> <570CE3F2.5000806@arm.com> <20160412201448.GL8697@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160412201448.GL8697@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 852 Lines: 29 On Wed, Apr 13, 2016 at 04:14:48AM +0800, Yuyang Du wrote: > On Tue, Apr 12, 2016 at 01:02:58PM +0100, Dietmar Eggemann wrote: > > On 10/04/16 23:36, Yuyang Du wrote: > > > > [...] > > > > > @@ -2704,11 +2694,14 @@ static __always_inline int > > > __update_load_avg(u64 now, int cpu, struct sched_avg *sa, > > > unsigned long weight, int running, struct cfs_rq *cfs_rq) > > > { > > > - u64 delta, scaled_delta, periods; > > > - u32 contrib; > > > - unsigned int delta_w, scaled_delta_w, decayed = 0; > > > + u64 delta; > > > + u32 contrib, periods; > > > unsigned long scale_freq, scale_cpu; > > > > > > + /* > > > + * now rolls down to a period boundary > > > + */ > > > + now = now && (u64)(~0xFFFFF); > > > > This forces now to be 1. > > > > s/&&/& > > Duh, :) Have you, or anybody else, actually tested the impact of this patch?