Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3229154pxu; Tue, 8 Dec 2020 06:53:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvVa8yyIjyd2HfMaNZZYeRqYWRnDf1nOWoOIpk3BwAmFzCtlfhuciJrHaMZIJtH/mRS7vo X-Received: by 2002:a17:906:1151:: with SMTP id i17mr24059831eja.250.1607439188747; Tue, 08 Dec 2020 06:53:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607439188; cv=none; d=google.com; s=arc-20160816; b=VQXetuMca1pgmio4mG/w+j43YAYOu/bGficqzBs1fjJKBt9B0yA1QmYgeKlvN2TpfW hNsVgpPB5GU/8dTQzN1AXgAnMqeuBzhARB0wYyU3khT689N3bspZRmLrWbq8+LH+4lOo wyXzAdnIabBEK8SSDHKOMnUGHpnJYDLjAE6R4Uun5FvY+ZUhiyadbl/QFcO2lwKjGFDg b6RfYHjzadDhy5piTEc+1MVkS1ztnev1vMNVqIPPTcC0tyPreVwxtz4fm5tiUtUXaFB1 DIZaq0QiGxbhcmZ50DCFIjgW1rMnv7xa06zAdOOut9RBC7kf33Dch2JUmCPwFxgVtRfR RH7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=I5EJ4E8Jr0ykoUCPxT2CLHwBX/iKZ3oQwhi/2arf/m4=; b=goT4KXASs56bC2hXTrXdkvA9b2s+ReAfj+yiou7IzG3S0wGT0CWwAHw1vpnnUI7DQj V142Lnuvr102eKX7xJHxPR8MwfLmWLTqb7Q5RV2yXOQBeG/KWxMIhKRzzwHATCZ2xQeH gmGpRhwbqLYg37IBZ8JqGOTfAxqg7AzkpqIW/vH5uc5kY+hUDF4lJtcbIhjy/hZ6yZ85 BFSeeh+pVAZBlnUdf9i2nTT0BnYEvdls8xFXngeMhv22ATOC9utTlBEDYSKV+iBOxaFr yIGTTeVOCLDXajHdxyx1jbIaxh9PaWTH+jhD/UTy7TAmuLTUhFCUfDlqT9sjNqIewM2r snYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lep5Evmm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p17si2327990ejd.679.2020.12.08.06.52.43; Tue, 08 Dec 2020 06:53:08 -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; dkim=pass header.i=@linaro.org header.s=google header.b=lep5Evmm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729752AbgLHOse (ORCPT + 99 others); Tue, 8 Dec 2020 09:48:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729471AbgLHOse (ORCPT ); Tue, 8 Dec 2020 09:48:34 -0500 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA9A3C061793 for ; Tue, 8 Dec 2020 06:47:53 -0800 (PST) Received: by mail-lf1-x142.google.com with SMTP id 23so10658546lfg.10 for ; Tue, 08 Dec 2020 06:47:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I5EJ4E8Jr0ykoUCPxT2CLHwBX/iKZ3oQwhi/2arf/m4=; b=lep5Evmm1QWT8tj7yW4pLaJ/IoRHG9QYGu+YeXef6cpL3PLSFge5pcIPlguQWGLqat WrqI4TZgk9gU4SrJ8sgSBUwVM8CwS5rJ/22B91uFF/dWnj+QRROe4q35uoxzxP8TsKYU 3bvMHAhnT3cob6Q14SXYWMjj7QiUp+2pv76Yw7mlqVxT+gT6WN0Stz6FEyFnTqu/p7wJ NRyanrxYs+KsTnrjfVfD42TMUWZm37/AWxKZii6GXsqUE/AqEcFZkNIsCekufqipBuPb 4RYSv2YvJW82ZgC83fUfMGxcR/+rS32jUZMvFWbmb7Qi7nGb2dCLfa+gK/wL543H21Xs /CeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I5EJ4E8Jr0ykoUCPxT2CLHwBX/iKZ3oQwhi/2arf/m4=; b=KnUhV0jTN8fDi8qfEdZ9REfRLyl2QCWk2Af5UefG/DdsG26NYtlVq4cmQD4b2VTjv/ 8cjWwJwOLQP+usA2u95YncQ6mhQr3bsdKEnc5NqnTN6ESRbgqqn9lrH9kqaszCKEogC6 FPRbsLZqwQltICdYvErlskkdmZrehZx3h9oJpD/b7ieDl3DLdxhC9jh/Tx4uEirTmPCB 1EpQF5qQJohBFcOLL6TM1lMdXh9bpnxzc8EkF+Qz6TFRuf8f/u5qUeT/vw15jS82VMvV rxhuP44EtpOTi1XKOEzgjf/GyDU/ZRFV9x8B0TrH9MoEa3ubgZNqUqWYLZTIJa6RunDo 6P3Q== X-Gm-Message-State: AOAM530Gyw6YuC3UiqmqMPnrVPU9vbnYhvq+17yfuZ11KVdjPeRZb/rs IAr4Z++9PC61Uj5gMP4KVuuu8STLhogCJpGBl3sJSA== X-Received: by 2002:ac2:5dfa:: with SMTP id z26mr4731164lfq.286.1607438871282; Tue, 08 Dec 2020 06:47:51 -0800 (PST) MIME-Version: 1.0 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> <20201208135358.GJ3371@techsingularity.net> In-Reply-To: <20201208135358.GJ3371@techsingularity.net> From: Vincent Guittot Date: Tue, 8 Dec 2020 15:47:40 +0100 Message-ID: Subject: Re: [PATCH 1/4] sched/fair: Remove SIS_AVG_CPU To: Mel Gorman Cc: Dietmar Eggemann , LKML , Aubrey Li , Barry Song , Ingo Molnar , Peter Ziljstra , Juri Lelli , Valentin Schneider , Linux-ARM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 8 Dec 2020 at 14:54, Mel Gorman wrote: > > 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 At the cost of a less readable code > 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. hmm... I think it is because the number of loop is directly related to the allowed cpus > > -- > Mel Gorman > SUSE Labs