Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426712AbdD1WKT (ORCPT ); Fri, 28 Apr 2017 18:10:19 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:36511 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967799AbdD1WJc (ORCPT ); Fri, 28 Apr 2017 18:09:32 -0400 Date: Sat, 29 Apr 2017 00:09:24 +0200 From: Peter Zijlstra To: Vincent Guittot Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com, Morten.Rasmussen@arm.com, yuyang.du@intel.com, pjt@google.com, bsegall@google.com Subject: Re: [PATCH v2] sched/fair: update scale invariance of PELT Message-ID: <20170428220924.mxzs43zyvfqww2ze@hirez.programming.kicks-ass.net> References: <1491815909-13345-1-git-send-email-vincent.guittot@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1491815909-13345-1-git-send-email-vincent.guittot@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 818 Lines: 27 On Mon, Apr 10, 2017 at 11:18:29AM +0200, Vincent Guittot wrote: > +++ b/include/linux/sched.h > @@ -313,6 +313,7 @@ struct load_weight { > */ > struct sched_avg { > u64 last_update_time; > + u64 stolen_idle_time; > u64 load_sum; > u32 util_sum; > u32 period_contrib; > + if (sa->util_sum < (LOAD_AVG_MAX * 1000)) { > + /* > + * Add the idle time stolen by running at lower compute > + * capacity > + */ > + delta += sa->stolen_idle_time; > + } > + sa->stolen_idle_time = 0; So I was wondering if stolen_idle_time really needs to be a u64. Afaict we'll be at LOAD_AVG_MAX after LOAD_AVG_MAX_N periods, or LOAD_AVG_MAX_N * LOAD_AVG_PERIOD time, which ends up being 11040. After that you'll truncate it anyway.. so there shouldn't be a need to be much larger than that, no?