Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3189068pxu; Tue, 8 Dec 2020 05:58:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwEEsywNhrSVE1ul2BpRlY/kua+k7Pu1BSYecTKX3pRDZ+OfUc6oqr9LV06rJkXYLlBwLKt X-Received: by 2002:a05:6402:1593:: with SMTP id c19mr25259163edv.269.1607435931211; Tue, 08 Dec 2020 05:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607435931; cv=none; d=google.com; s=arc-20160816; b=x+VktAqqL8lhHipNpthw//I64vK4vNjlIfhwFIdQ+fsA9EWU5VONrAVRO+Ql4wi4Js YjT7qo9sX4XP+dCkL6MezMCyUiWMc/nG7BM21N+YgGam5r50pDs0j8mYf4bYnCtXnD1w ZbOt7Mrgmeki+WoVcqToO/rpA9Pd4tJgBjnmP6txqwC6rt/GRPpRF1o5eX/Db1xfUFqD 43MnRv+E5uL6yMQBWK/TPOvZSU1TqfLPzfI0h5mFQc9a2ufyQ4x202BGKYyI8yEzaiCs NCWoxGndM/kgTgqZNnkbF+MVKXtZj/llOKIk5VU1khJvPSZgsTY73helNXFgVPtWtqrW LsFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=WsPFcV5Pxuqzmre4L38nMOIuJfCilChW2SJUuXn4XXE=; b=PRCjRchbkSxfv5swfxCd9le2kryRJAp1gBQdWJQBvMEEMOIh40HM1YEnJ6fQyvzUvu 9Z9BlWpsgrN+3HhwJrNi74QYEwgWSmQQj3FJrBliaBE0tuIYxSRlhWVZEo2EamO3f+9a m0Cn/9AM5TdZnNRS7tR37SND3Kpi/jx5IZ9idcgVhobu6HrGskH+ylOgdp6RsvFI58ct O8+kjDKI/xVB9vQ+nY+Uk/k8kGi0WuG9e8TdIeJ+pPHaw+i+YHZ2tcSLpaB5N3w/9t8U P6jR8FCTcRXcT93g9j8NObVDr1tVYU3r7RitTCg7+rPUMOIIwvKAhahzYOAggwfLsNPW 65Rg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt4si8291816ejc.439.2020.12.08.05.58.27; Tue, 08 Dec 2020 05:58:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729461AbgLHNyx (ORCPT + 99 others); Tue, 8 Dec 2020 08:54:53 -0500 Received: from outbound-smtp18.blacknight.com ([46.22.139.245]:50395 "EHLO outbound-smtp18.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726338AbgLHNyw (ORCPT ); Tue, 8 Dec 2020 08:54:52 -0500 Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp18.blacknight.com (Postfix) with ESMTPS id 219731C3AAE for ; Tue, 8 Dec 2020 13:54:01 +0000 (GMT) Received: (qmail 27912 invoked from network); 8 Dec 2020 13:54:00 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 8 Dec 2020 13:54:00 -0000 Date: Tue, 8 Dec 2020 13:53:58 +0000 From: Mel Gorman To: Vincent Guittot Cc: Dietmar Eggemann , LKML , Aubrey Li , Barry Song , Ingo Molnar , Peter Ziljstra , Juri Lelli , Valentin Schneider , Linux-ARM Subject: Re: [PATCH 1/4] sched/fair: Remove SIS_AVG_CPU Message-ID: <20201208135358.GJ3371@techsingularity.net> References: <20201207091516.24683-1-mgorman@techsingularity.net> <20201207091516.24683-2-mgorman@techsingularity.net> <25a8c4bd-792b-2851-b10a-c4375eb83dfe@arm.com> <20201208105900.GG3371@techsingularity.net> <20201208133650.GI3371@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 08, 2020 at 02:43:10PM +0100, Vincent Guittot wrote: > On Tue, 8 Dec 2020 at 14:36, Mel Gorman wrote: > > > > On Tue, Dec 08, 2020 at 02:24:32PM +0100, Vincent Guittot wrote: > > > > > Nitpick: > > > > > > > > > > Since now avg_cost and avg_idle are only used w/ SIS_PROP, they could go > > > > > completely into the SIS_PROP if condition. > > > > > > > > > > > > > Yeah, I can do that. In the initial prototype, that happened in a > > > > separate patch that split out SIS_PROP into a helper function and I > > > > never merged it back. It's a trivial change. > > > > > > while doing this, should you also put the update of > > > this_sd->avg_scan_cost under the SIS_PROP feature ? > > > > > > > It's outside the scope of the series but why not. This? > > > > --8<-- > > sched/fair: Move avg_scan_cost calculations under SIS_PROP > > > > As noted by Vincent Guittot, avg_scan_costs are calculated for SIS_PROP > > even if SIS_PROP is disabled. Move the time calculations under a SIS_PROP > > check and while we are at it, exclude the cost of initialising the CPU > > mask from the average scan cost. > > > > Signed-off-by: Mel Gorman > > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index 19ca0265f8aa..0fee53b1aae4 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -6176,10 +6176,10 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t > > nr = 4; > > } > > > > - time = cpu_clock(this); > > I would move it in the if (sched_feat(SIS_PROP)) above. > I considered it but made the choice to exclude the cost of cpumask_and() from the avg_scan_cost instead. It's minor but when doing the original prototype, I didn't think it was appropriate to count the cpumask clearing as part of the scan cost as it's not directly related. -- Mel Gorman SUSE Labs