From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1951576AbdEAOxp (ORCPT ); Mon, 1 May 2017 10:53:45 -0400 Received: from merlin.infradead.org ([205.233.59.134]:49914 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1950579AbdEAOwb (ORCPT ); Mon, 1 May 2017 10:52:31 -0400 Date: Mon, 1 May 2017 16:52:23 +0200 From: Peter Zijlstra To: Vincent Guittot Cc: Tejun Heo , Ingo Molnar , linux-kernel , Linus Torvalds , Mike Galbraith , Paul Turner , Chris Mason , kernel-team@fb.com Subject: Re: [PATCH 1/2] sched/fair: Fix how load gets propagated from cfs_rq to its sched_entity Message-ID: <20170501145223.7mf74b3zztu5xf3n@hirez.programming.kicks-ass.net> References: <20170424201344.GA14169@wtj.duckdns.org> <20170424201415.GB14169@wtj.duckdns.org> <20170425181219.GA15593@wtj.duckdns.org> <20170426165123.GA17921@linaro.org> <20170501141733.shphf35psasefraj@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170501141733.shphf35psasefraj@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 01, 2017 at 04:17:33PM +0200, Peter Zijlstra wrote: > So this here does: > > ( tg->load_avg = \Sum cfs_rq->load_avg ) > > load = cfs_rq->load.weight > > tg_weight = tg->load_avg - cfs_rq->contrib + load > > > tg->shares * load > shares = ----------------- > tg_weight > > > cfs_rq->load_avg > avg_shares = shares * ---------------- > load > > tg->shares * cfs_rq->load_avg > = ----------------------------- > tg_weight > > > ( se->load.weight = shares ) > > se->load_avg = min(shares, avg_shares); I wonder though; do we really need the min() ? Can't we simply use avg_shares all the time?