Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4573469ybb; Tue, 14 Apr 2020 09:53:31 -0700 (PDT) X-Google-Smtp-Source: APiQypL5y8/GL3aFTcUM8XKjZC0hM/LaMiBph5QGFmt3VswjtY4okMPOmgWUReFyD680KgldBYrV X-Received: by 2002:a17:906:6944:: with SMTP id c4mr1099151ejs.96.1586883210851; Tue, 14 Apr 2020 09:53:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586883210; cv=none; d=google.com; s=arc-20160816; b=ClPshqiErxZ0X9+CgLVoeZId3AsjBD85ivplnWRA9U1/np7iVBbpsaFnSs9fx0mjJo lVzjaF161TAqmnZ5OxHD/JreyXeY/VqSkJrcGqh32O8kjDdHGdJww10ZKtlqlHBUpKvq mtM4o65hB1mCvipuQ6zNgnIBpvepLGnzFPdHtIoCRnQh/LAF/FKPiP2lCZpvjpIQ5MJh ldkEjeauzIlEDfHp/m5/v7q7M8GcwHf2eBJyjodK6+YAShJZHTlfWzXv7u7LLva8KJ/5 wM0h+z/Al565S5pW2PdnDZPKnbA+1g1SarKj5qo+XPLCgbZ0qnYFnuj/eo0Vh/yE7my1 sUTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=HX5KTGsae8v7drEiGKng7b+OXMi1rCkdRouOYjUbZIk=; b=oxODEeU4sQGw3VqycZPckViHsnPSSx5jUIdEHiCghlaAr3nCQnAglf+cgdimCb59l9 Uv8ui0bXNnaCxqZucsNqW55Cln5lIOltWAUoy5E6Y97nfUrBA4JxtPwncca4nOz7PIZo u/WcO9veDeuM9Pf3dLG2HU/+K/6Juc8cMIGv2otddksBOkdjUCG3NjfbiPJ5eZ+pupTD OtaEvAV+mtf2lDeHAhfzk7V3nCbeIdbnCNDhok+JWrxq9EMfshqWfRLnyDXN+TShF0P7 6NhB63AXwwOQ/L/UxZ95fzLP5NpueeLZd/ByU7PDPLdq9i12/mjxwbSKWf1QpMTLkfYP jmPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MJwBplRI; spf=pass (google.com: best guess record for 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 a3si8897610ejj.33.2020.04.14.09.53.06; Tue, 14 Apr 2020 09:53:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for 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=MJwBplRI; spf=pass (google.com: best guess record for 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 S2440827AbgDNPnu (ORCPT + 99 others); Tue, 14 Apr 2020 11:43:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2440812AbgDNPnr (ORCPT ); Tue, 14 Apr 2020 11:43:47 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5509C061A0C for ; Tue, 14 Apr 2020 08:43:46 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id y4so271282ljn.7 for ; Tue, 14 Apr 2020 08:43:46 -0700 (PDT) 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=HX5KTGsae8v7drEiGKng7b+OXMi1rCkdRouOYjUbZIk=; b=MJwBplRIjpLs45jKUc+59I60QA8e7sPiLQYPfYXBhzkW3JFAYf9GwG1EIzUx7IgBxv oA1MrdFyz6kgKX40Ivj+rbSQIbi7pCaRQqNGhw7OP90F70vOGvPxoJnWACzewhxci0sH UAA35+vjvakxCZ+Iv1ZiDO/Ri3RtlzR361nG+NEdJqVbTvH9xAP7QZNW06InQNyUth/n yTgNImHxnUiwmj2QCm+wuXEpllIEsQXkZB1HVEL9EpMELDG299iX0tAEeW2+ZVw8Nj3c mJF3GD1pCt0bodvRJS5tLFBxZCtWZtFLhcw+UhrElzhssMHl2vNAujjflAHKyeQ4CNJN twhw== 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=HX5KTGsae8v7drEiGKng7b+OXMi1rCkdRouOYjUbZIk=; b=gIbrjLUrah5f9KCnggUdfYgbRwfoNL9awSWaVWF92tC4BAKpTd1sOxWcJViclWvAUv TLxv6sFSoi8LuR3tJJHGDo6cqnr98jcVtj0fLhLSKZxYwMUfA6/YJdHG56cZwTt4ifmk 9qHv/qvli2gd2lYnAkWsZWhaequ+fgNcb3rK+S+xCGkJ+oALpJhltFicj9tXe6Pcf+MM T2zwHXGLDXtVd7llaKYOHJq5ox6OCvsR/r2EIFeV79QCNdRQq7U4OOsl4iPL3H/qyboS eSUOCVNG/50NvX+gDchHytqnskb84/hiJQS1Ua0Z+CYB42viu9i6zRpZJYTD+LMBcrj6 yVEw== X-Gm-Message-State: AGi0PuZM39bdroaeyfSh8zXgAYq+cQlHaCoTN+8Oqe8Cu2YD/tHh41uP XlpXb2htUvH/Ky8c3UOMZtytfHuoOgHfB+Grtt3Fwg== X-Received: by 2002:a2e:800a:: with SMTP id j10mr473793ljg.65.1586879025108; Tue, 14 Apr 2020 08:43:45 -0700 (PDT) MIME-Version: 1.0 References: <20200408095012.3819-1-dietmar.eggemann@arm.com> <20200408095012.3819-2-dietmar.eggemann@arm.com> <42cc3878-4c57-96ba-3ebd-1b4d4ef87fae@arm.com> <20200414124503.GA236568@google.com> <7adf893b-769d-ffa4-71da-d9a93646a88c@arm.com> In-Reply-To: <7adf893b-769d-ffa4-71da-d9a93646a88c@arm.com> From: Vincent Guittot Date: Tue, 14 Apr 2020 17:43:33 +0200 Message-ID: Subject: Re: [PATCH 1/4] sched/topology: Store root domain CPU capacity sum To: Dietmar Eggemann Cc: Quentin Perret , Ingo Molnar , Peter Zijlstra , Juri Lelli , Steven Rostedt , Luca Abeni , Daniel Bristot de Oliveira , Wei Wang , Alessio Balsini , Pavan Kondeti , Patrick Bellasi , Morten Rasmussen , Valentin Schneider , Qais Yousef , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Apr 2020 at 17:27, Dietmar Eggemann wrote: > > On 14.04.20 14:45, Quentin Perret wrote: > > On Wednesday 08 Apr 2020 at 19:03:57 (+0200), Vincent Guittot wrote: > >> Or we can do the opposite and only use capacity_orig_of()/rq->cpu_capacity_orig. > >> > >> Is there a case where the max cpu capacity changes over time ? So I > >> would prefer to use cpu_capacity_orig which is a field of scheduler > >> instead of always calling an external arch specific function > > > > Note however that using arch_scale_cpu_capacity() would be more > > efficient, especially on non-arm/arm64 systems where it is a > > compile-time constant. > > or essentially all ARCHs not defining it. > > > > > It's probably a matter of personal taste, but I find rq->cpu_capacity_orig > > superfluous. It wastes space without actually giving you anything no? > > Anybody remembers why it was introduced in the first place? > > v3.18 arm providing arch_scale_cpu_capacity() > v4.1 introduction of rq->cpu_capacity_orig > v4.10 arm64 providing arch_scale_cpu_capacity() > ... > > So it's down to the question of 'minimizing the scheduler calls to an > external arch function' vs 'efficiency'. Using cpu_capacity_orig will provide more consistency because it will be set while setting the sched_domain topology