Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7811548ybi; Thu, 6 Jun 2019 01:46:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwi8R/qTP3XmemM6TqOXdu9pQjwZEO4uvksHoeHalcgzqsOMBlE5Vrp1YTLbF2MxJ4B/D4Y X-Received: by 2002:a17:90a:9f93:: with SMTP id o19mr50701908pjp.70.1559810813672; Thu, 06 Jun 2019 01:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559810813; cv=none; d=google.com; s=arc-20160816; b=yWWUKX+zHaDM8CB7QSHu1lQh+S1boNiXotT2hjAhgU6ZbvZY2RAKO1/dV6BzmcHF8B 7FnG3jLzjO8F2r6dFhSoOuq4hpCJY/uWwCYiBN2QhNHgkfRUfxGIQ1JoaJj4i5uayV4l nbLlfUWB3vPyv/xInu7B/8s7XRXeAD7BO0DzJGIRArkL+mr5iMD5DubLbRdaqBqQybAF vUHetvmD7dwp/RhDqItFMxMdLxbMai0lCokngdNAS342PxK/yKjE1Kx2xCJifhPI19Hq AiY90wi/ZKz/6gzKppBJ9Ym2zdn1n2HAiDhf8tvDHj2AkPOUrHhum4FEi5cskUg6QncI J4og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Z3BynniL104up+cW9b6F68LH7Vk3TYOj+gBnu/PWYiY=; b=xCG7RYpSe/eLdH5Z230Uj8ilR3++hRMnyLvd4PNjc+5cTDmr7aJRMnrr2nBT38aZia P0UQGvRckqjxdgvu3WMY8F+L/cJG1KDULZKaA9qVtxy0IFs/D0LyEQVl3qpSe4Wltaph v3DIKoMsb3A54MIf+cJ/Kc689UEHimBgRiwHfPLsjT6elldStD5DDVkDNlMsbkLZsiEc gzSTMv7GE8KQeJIsk23+vzZ8/NsjvOi0Hboys5KoRxpm1gb9p57AR/hlOAy4k9QwTysl C9fb0pY+RgxTylVDxKxLD8anVZs9TGXB0+ezxOwx9wSYl9Kkvtzy8E1Oxd0nOd2bAD5R I4sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NGK9pbnW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id cl13si1298596plb.97.2019.06.06.01.46.37; Thu, 06 Jun 2019 01:46:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NGK9pbnW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727434AbfFFIpM (ORCPT + 99 others); Thu, 6 Jun 2019 04:45:12 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:42543 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726926AbfFFIpM (ORCPT ); Thu, 6 Jun 2019 04:45:12 -0400 Received: by mail-lf1-f65.google.com with SMTP id y13so922092lfh.9 for ; Thu, 06 Jun 2019 01:45:10 -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:content-transfer-encoding; bh=Z3BynniL104up+cW9b6F68LH7Vk3TYOj+gBnu/PWYiY=; b=NGK9pbnWYhJ4n548kyDQ9PxhAo0Ex1P/YwAaGMfvoCN0RDA64no9A5UXi9Jmuc1K6z fuIZGvuAUEuYYqoFHHnc7r1K5kjLln83q5LvGPazaOvc+x+zScan/xXrkPe40uNBj77G T/CL77DCLUWBjtm8LTdxwwVQBSeUigdj+z0hhVbv11FJOJ/7LfzgRVWtfELzDTUjlDo0 8G+J1c3U9BQpMISDcsLfmKwdyr8Kxh16/bYqEgX5K5HHjWbqR2sFWcPdCY7l8R2hUkVa av6vEG6mG5CbVdoS8CPjekOUxg9nR2TtoX2IhIrJFB/qYWqrGInvdbo45Rw9aIqiijmA R+XQ== 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:content-transfer-encoding; bh=Z3BynniL104up+cW9b6F68LH7Vk3TYOj+gBnu/PWYiY=; b=ZK0Tr1q4aEgnFVyfsGDE50JNM1pvhRMNA3+ROdilyU4bZDg0ux2dpvvTLP7wzDmvmu AhZDAsglo8E+umHPHsMi5Ql3ZmIwO2EgrawF7EouwkatsuiMOSGDA8MifmNfapEX5FyF LPy6sDo9Cdf2ssau55spvKuycH8kxmbCjXIivjhVX1U4+BiQUce5iF8Qe+RhNk3dTpYn 3nrARXidAOAKlJ/HUhvkXazo607dtFgpsXoBjOpmBwiUVdOSMEBZ9VLFb44XgAQ8pViq RFDMEAnx/r/AzmE/pWMQ16UVAT8pYujYUKAlHuV467MWOtsL7FWITvhlF6CLCrT+Lhq0 BMLw== X-Gm-Message-State: APjAAAWCNoKiXrRXLjQwOaCIMmhiOi8kv+/Ox0ix9CjnOWzYAApNblKY 5Rp+OWfNO6bu0K3aiBSQ9Ws+QZuFd2pthCFVovdgOA== X-Received: by 2002:ac2:46d5:: with SMTP id p21mr20502406lfo.133.1559810709333; Thu, 06 Jun 2019 01:45:09 -0700 (PDT) MIME-Version: 1.0 References: <20190114184255.258318-1-mka@chromium.org> <155786856719.14659.2902538189660269078@swboyd.mtv.corp.google.com> <5cdf2dc8.1c69fb81.521c8.9339@mx.google.com> <20190605172048.ahzusevvdxrpnebk@queper01-ThinkPad-T460s> <20190606074921.43mbinemk3j565yu@queper01-ThinkPad-T460s> <9267b9ed-89b0-7b71-88a2-ca1894d4c497@arm.com> In-Reply-To: <9267b9ed-89b0-7b71-88a2-ca1894d4c497@arm.com> From: Vincent Guittot Date: Thu, 6 Jun 2019 10:44:58 +0200 Message-ID: Subject: Re: [PATCH] arm64: dts: sdm845: Add CPU topology To: Dietmar Eggemann Cc: Quentin Perret , Stephen Boyd , Amit Kucheria , Andy Gross , Matthias Kaehlcke , David Brown , Rob Herring , Mark Rutland , linux-arm-msm , "open list:ARM/QUALCOMM SUPPORT" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML , Douglas Anderson , Rajendra Nayak , Morten Rasmussen Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 6 Jun 2019 at 10:34, Dietmar Eggemann wr= ote: > > On 6/6/19 10:20 AM, Vincent Guittot wrote: > > On Thu, 6 Jun 2019 at 09:49, Quentin Perret wr= ote: > >> > >> Hi Vincent, > >> > >> On Thursday 06 Jun 2019 at 09:05:16 (+0200), Vincent Guittot wrote: > >>> Hi Quentin, > >>> > >>> On Wed, 5 Jun 2019 at 19:21, Quentin Perret = wrote: > >>>> > >>>> On Friday 17 May 2019 at 14:55:19 (-0700), Stephen Boyd wrote: > >>>>> Quoting Amit Kucheria (2019-05-16 04:54:45) > >>>>>> (cc'ing Andy's correct email address) > >>>>>> > >>>>>> On Wed, May 15, 2019 at 2:46 AM Stephen Boyd = wrote: > >>>>>>> > >>>>>>> Quoting Amit Kucheria (2019-05-13 04:54:12) > >>>>>>>> On Mon, May 13, 2019 at 4:31 PM Amit Kucheria wrote: > >>>>>>>>> > >>>>>>>>> On Tue, Jan 15, 2019 at 12:13 AM Matthias Kaehlcke wrote: > >>>>>>>>>> > >>>>>>>>>> The 8 CPU cores of the SDM845 are organized in two clusters of= 4 big > >>>>>>>>>> ("gold") and 4 little ("silver") cores. Add a cpu-map node to = the DT > >>>>>>>>>> that describes this topology. > >>>>>>>>> > >>>>>>>>> This is partly true. There are two groups of gold and silver co= res, > >>>>>>>>> but AFAICT they are in a single cluster, not two separate ones.= SDM845 > >>>>>>>>> is one of the early examples of ARM's Dynamiq architecture. > >>>>>>>>> > >>>>>>>>>> Signed-off-by: Matthias Kaehlcke > >>>>>>>>> > >>>>>>>>> I noticed that this patch sneaked through for this merge window= but > >>>>>>>>> perhaps we can whip up a quick fix for -rc2? > >>>>>>>>> > >>>>>>>> > >>>>>>>> And please find attached a patch to fix this up. Andy, since thi= s > >>>>>>>> hasn't landed yet (can we still squash this into the original pa= tch?), > >>>>>>>> I couldn't add a Fixes tag. > >>>>>>>> > >>>>>>> > >>>>>>> I had the same concern. Thanks for catching this. I suspect this = must > >>>>>>> cause some problem for IPA given that it can't discern between th= e big > >>>>>>> and little "power clusters"? > >>>>>> > >>>>>> Both EAS and IPA, I believe. It influences the scheduler's view of= the > >>>>>> the topology. > >>>>> > >>>>> And EAS and IPA are OK with the real topology? I'm just curious if > >>>>> changing the topology to reflect reality will be a problem for thos= e > >>>>> two. > >>>> > >>>> FWIW, neither EAS nor IPA depends on this. Not the upstream version = of > >>>> EAS at least (which is used in recent Android kernels -- 4.19+). > >>>> > >>>> But doing this is still required for other things in the scheduler (= the > >>>> so-called 'capacity-awareness' code). So until we have a better > >>>> solution, this patch is doing the right thing. > >>> > >>> I'm not sure to catch what you mean ? > >>> Which so-called 'capacity-awareness' code are you speaking about ? an= d > >>> what is the problem ? > >> > >> I'm talking about the wake-up path. ATM select_idle_sibling() is total= ly > >> unaware of capacity differences. In its current form, this function > >> basically assumes that all CPUs in a given sd_llc have the same > >> capacity, which would be wrong if we had a single MC level for SDM845. > >> So, until select_idle_sibling() is 'fixed' to be capacity-aware, we ne= ed > >> two levels of sd for asymetric systems (including DynamIQ) so the > >> wake_cap() story actually works. > >> > >> I hope that clarifies it :) > > > > hmm... does this justifies this wrong topology ? > > select_idle_sibling() is called only when system is overloaded and > > scheduler disables the EAS path > > In this case, the scheduler looks either for an idle cpu or for evenly > > spreading the loads > > This is maybe not always optimal and should probably be fixed but > > doesn't justifies a wrong topology description IMHO > > The big/Little cluster detection in wake_cap() doesn't work anymore with > DynamIQ w/o Phanton (DIE) domain. So the decision of going sis() or slow > path is IMHO broken. That's probably not the right thread to discuss this further but i'm not sure to understand why wake_cap() doesn't work as it compares the capacity_orig of local cpu and prev cpu which are the same whatever the sche domain=C5=93 > But I support the idea of not introducing Phantom Domains in device tree > and fix wake_cap() instead.