From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751275AbdEBUAc (ORCPT ); Tue, 2 May 2017 16:00:32 -0400 Received: from mail-yw0-f196.google.com ([209.85.161.196]:34726 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751074AbdEBUAb (ORCPT ); Tue, 2 May 2017 16:00:31 -0400 Date: Tue, 2 May 2017 16:00:28 -0400 From: Tejun Heo To: Peter Zijlstra Cc: Vincent Guittot , 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: <20170502200028.GA5335@htj.duckdns.org> 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> <20170501215604.GB19079@htj.duckdns.org> <20170502081905.GA4626@worktop.programming.kicks-ass.net> <20170502083009.GA3377@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170502083009.GA3377@worktop.programming.kicks-ass.net> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Peter. Your changes need the following fix patch. With the fix and "sched/fair: Always propagate runnable_load_avg" applied, it seems to work fine. The propagated number is a bit different but I don't see noticeable difference in behavior and the new number seems to better represent what we need. Thanks. --- kernel/sched/fair.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2645,7 +2645,8 @@ enum shares_type { #ifdef CONFIG_FAIR_GROUP_SCHED # ifdef CONFIG_SMP static long -calc_cfs_shares(struct cfs_rq *cfs_rq, struct task_group *tg, enum shares_type) +calc_cfs_shares(struct cfs_rq *cfs_rq, struct task_group *tg, + enum shares_type shares_type) { long tg_weight, tg_shares, load, shares; @@ -2705,7 +2706,7 @@ calc_cfs_shares(struct cfs_rq *cfs_rq, s } # else /* CONFIG_SMP */ static inline long -calc_cfs_shares(struct cfs_rq *cfs_rq, struct task_group *tg, enum shares_type) +calc_cfs_shares(struct cfs_rq *cfs_rq, struct task_group *tg, enum shares_type shares_type) { return tg->shares; } @@ -3104,7 +3105,7 @@ static inline void update_tg_cfs_load(struct cfs_rq *cfs_rq, struct sched_entity *se) { struct cfs_rq *gcfs_rq = group_cfs_rq(se); - long delta, load = calc_cfs_shares(gcfs_rq, gcfs_rq->tg, shares_runnable); + long delta, load = scale_load_down(calc_cfs_shares(gcfs_rq, gcfs_rq->tg, shares_runnable)); delta = load - se->avg.load_avg;