From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935354AbdCVQaz (ORCPT ); Wed, 22 Mar 2017 12:30:55 -0400 Received: from foss.arm.com ([217.140.101.70]:45588 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934214AbdCVQas (ORCPT ); Wed, 22 Mar 2017 12:30:48 -0400 Subject: Re: [PATCH] sched/fair: Fix ftq noise bench regression To: Vincent Guittot References: <1489758442-2877-1-git-send-email-vincent.guittot@linaro.org> <418a2486-51ec-01f4-2af5-0988bc704a28@arm.com> Cc: Peter Zijlstra , Ingo Molnar , linux-kernel , "Huang, Ying" From: Dietmar Eggemann Message-ID: Date: Wed, 22 Mar 2017 16:22:24 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/03/17 09:22, Vincent Guittot wrote: > On 21 March 2017 at 18:46, Dietmar Eggemann wrote: >> Hi Vincent, >> >> On 17/03/17 13:47, Vincent Guittot wrote: >> >> [...] >> >>> Reported-by: ying.huang@linux.intel.com >>> Signed-off-by: Vincent Guittot >>> Fixes: 4e5160766fcc ("sched/fair: Propagate asynchrous detach") [...] >> Why not turn skip_blocked_update(se) into blocked_update_needed(cpu, cfs_rq)? >> Saves a couple of patch lines: > > Are you sure that we are saving some patch lines ? Sorry, it's actually the same :-) > > I tend to agree on the name and but not on parameters. > IMO, it's easier to understand the purpose of > blocked_update_needed(se) compared to blocked_update_needed(cpu, > cfs_rq) OK, so: - /* Propagate pending load changes to the parent */ - if (cfs_rq->tg->se[cpu]) + /* Propagate pending load changes to the parent if any */ + if (blocked_update_needed(cfs_rq->tg->se[cpu])) and +static inline bool blocked_update_needed(struct sched_entity *se) +{ + struct cfs_rq *gcfs_rq = group_cfs_rq(se); + + /* cfs_rq of a root task_group has no sched_entity counterpart */ + if (!se) + return false; + + /* + * If sched_entity still have not null load or utilization, we have to + * decay it. + */ .... Would make sense to me ...