Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3814412ybi; Mon, 29 Jul 2019 13:08:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4TpC9N5eqySTV2w4DyStb129e0o2nLsvhdq/sBbCXYkK9HQzeOOL6CVfOpSiPeEDujX/0 X-Received: by 2002:a17:902:8547:: with SMTP id d7mr113776253plo.171.1564430937604; Mon, 29 Jul 2019 13:08:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564430937; cv=none; d=google.com; s=arc-20160816; b=x9uodhocN2mszr4UPMi8w2JCLj0h+JEPrc05wl5/uOIAk6YYFHB3cGEUt6Mh/PEh6B Bk4X6OZ3lKTpmEo4qZcZrd//KW1ZfXaSNecYH8569/HU1ddeqAobJ/xcxDPgooSDcrcl 7AwmvT2C+1IxaM5RCLFzZyA+Lv8Dvg3cyEkha3G4640dK9g9T+ANFE0CyJ82vFuzywLW pSiLu8A6LBfBtKltcTN+9/3i7co9CejKbAlf+0OrTkinDibO2dyMTzNyYMqEWOKhPHsx eVEVFI9SZjhUs09rrIHI1fMkmf6mKYXtWoYZB5DIdozFWWo0xCg6f7Kd1z1Pb0tZTtng /JWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0gMfhsL57S9uWkYqeXAfJBBv5D0vkqm5tG9LEtrmObA=; b=o9IpOjTelhNK35prKW7U7wJc7LEWwxE7AR+sJrWjp0QKFGjxHiRIjdANMPPmMkHkxr 5cm78cn2ErJFXz0cZ215rkNW/Jt+u0nvBlDMc2hc04ZDkfp+KBhcC4jzL9O+vraVDjnB qkTDgtRJ+CufR/BRji53bEYli9AEvcAHsf9WhckkSmP44u7+SaEpLVopM4e8ezvVlubo YHeIsTGckjrBnLn7DZNjr3gFSIOqMEb2DOOIJ0x/xoeU+VGoh7mPhEsrRMQrxk5l2OrH ICFqAWRNO7h0+2EPiBcoQ9J/SEC/Hv35fqBHHz1pRb97wOKuc3oyBaZXp4maJ/q7ys9o b21w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=q1JasuZi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t191si26793033pgd.370.2019.07.29.13.08.42; Mon, 29 Jul 2019 13:08:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=q1JasuZi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390157AbfG2UGU (ORCPT + 99 others); Mon, 29 Jul 2019 16:06:20 -0400 Received: from merlin.infradead.org ([205.233.59.134]:51216 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389378AbfG2UGP (ORCPT ); Mon, 29 Jul 2019 16:06:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0gMfhsL57S9uWkYqeXAfJBBv5D0vkqm5tG9LEtrmObA=; b=q1JasuZiwMWBl6dcjR7LBhWsx 3B/1dFwHMg28at/6J5SY8UmpgbYzTsm/qdmf+sGHkJldSejrQ/sHdTLPL7JmZ3/rDqiFYpUoA8+Lp TWEMznaK492NCxlVuwoJix6GwCXzx6DIKBQu5ncHhRRpLRD095+mti4pFVjNj2nueg8aMDtP9NpCx 0e9TIZ1FJ/0/v7oeQtPoBZYkFgsrR1VE2qi08TDrUGqAVk45j6v+2XHSOILUcx8t+LI4yolIJ3/hB 6kZ/XFejyIwhjSyupFLiYj+K2JemBql8PDHiYKoDucjcbUGBEBmV+PjStne7AQ8xl1gdQeCzong/E 23HfEyTTg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hsBuA-0006hT-JF; Mon, 29 Jul 2019 20:05:58 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 54B7820C9B165; Mon, 29 Jul 2019 22:05:57 +0200 (CEST) Date: Mon, 29 Jul 2019 22:05:57 +0200 From: Peter Zijlstra To: Rik van Riel Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, pjt@google.com, dietmar.eggemann@arm.com, mingo@redhat.com, morten.rasmussen@arm.com, tglx@linutronix.de, mgorman@techsingularity.net, vincent.guittot@linaro.org Subject: Re: [PATCH 03/14] sched,fair: redefine runnable_load_avg as the sum of task_h_load Message-ID: <20190729200557.GR31398@hirez.programming.kicks-ass.net> References: <20190722173348.9241-1-riel@surriel.com> <20190722173348.9241-4-riel@surriel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190722173348.9241-4-riel@surriel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 22, 2019 at 01:33:37PM -0400, Rik van Riel wrote: > @@ -3012,25 +2983,24 @@ static inline int throttled_hierarchy(struct cfs_rq *cfs_rq); > static void update_cfs_group(struct sched_entity *se) > { > struct cfs_rq *gcfs_rq = group_cfs_rq(se); > - long shares, runnable; > + long shares; > > - if (!gcfs_rq) > + if (!gcfs_rq) { > + update_runnable_load_avg(se); > return; > + } > > if (throttled_hierarchy(gcfs_rq)) > return; > > #ifndef CONFIG_SMP > - runnable = shares = READ_ONCE(gcfs_rq->tg->shares); > - > if (likely(se->load.weight == shares)) I'm thinking this uses @shares uninitialized... > return; > #else > shares = calc_group_shares(gcfs_rq); > - runnable = calc_group_runnable(gcfs_rq, shares); > #endif > > - reweight_entity(cfs_rq_of(se), se, shares, runnable); > + reweight_entity(cfs_rq_of(se), se, shares); > }