Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp687740imu; Fri, 9 Nov 2018 04:34:29 -0800 (PST) X-Google-Smtp-Source: AJdET5dq57qs1KqiZ6rh8EzDWy5B7Got6Zdui2PHHgIcZ2PrBAWqrMSHGh3RhCcNiXsm/p6+1uNm X-Received: by 2002:a62:1fca:: with SMTP id l71-v6mr9102987pfj.23.1541766869456; Fri, 09 Nov 2018 04:34:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541766869; cv=none; d=google.com; s=arc-20160816; b=SvL5FSqCdyQpb/mhCRKhktwAhxKORjMw3sQ4poDIdhan9H8wbm1G6v7llVkghOhngA N6UHxpbSWocNsdd/S/fl42qzGmzlxeNNuOiQq3RkzlUhpeWTV5Uez86ZXZ2q68s+IsWU /LZcWaYo9ZJpB5beYOv+iwEJKvVhXcSdO7ZsupJSPFWmhuMmU/E0pzWl46q/5x9dR/t/ QqqYcXRE0bhQOYzKu6Fxsha6xUq8NBAf/uJY0Mrfn0QUlNp9T4deYs93EBXHBaJT6ZzN Q5FN7Hklvj3B5H0yX3WW/MZ78xP1M0TdplSoK5DjUIRgEbB0nDj/jcM/RkoDVO8OELfi M60w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=zWWrNb/CA6rAmuHxafUeutZIfp1LlkjCJijkG+6c+yA=; b=xLKwq80Ui8NTS4a1StgF7neAKG6jX0dizEFpGXzxIE55xdc5LaQtq9jT5hEqCmaD1B NrMQjWMLK4GX+KryrspDfrw6RirlNicBjsnNVS/JB6C83wO/4NPiPP41Yrh3AFlLBAXe xgFD/PLEe2yVgmQX3SWlLj5ajWII6wqD8tYaDlzMApFn3ozHO0WQH921XgRMasETrUAx CqsS14LYvbgFxj149LXY+6KlVnyqEPCUCquPqumf7+50WkJcLV74SgvIJRcpY7egoIKW +fRopWAQ4hVho6HwxE/JGAq2YPFjXOueyhVrf9px7LOMRHpUvdA4q0AzzhNOjjq6tse6 0g9A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v24-v6si7301985ply.158.2018.11.09.04.34.11; Fri, 09 Nov 2018 04:34:29 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727848AbeKIWOM (ORCPT + 99 others); Fri, 9 Nov 2018 17:14:12 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:58548 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727753AbeKIWOM (ORCPT ); Fri, 9 Nov 2018 17:14:12 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 77F0180D; Fri, 9 Nov 2018 04:33:46 -0800 (PST) Received: from e107155-lin (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1F66A3F718; Fri, 9 Nov 2018 04:33:43 -0800 (PST) Date: Fri, 9 Nov 2018 12:33:38 +0000 From: Sudeep Holla To: Nick Kossifidis Cc: Mark Rutland , Atish Patra , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, Damien.LeMoal@wdc.com, alankao@andestech.com, zong@andestech.com, anup@brainfault.org, palmer@sifive.com, linux-kernel@vger.kernel.org, hch@infradead.org, robh+dt@kernel.org, tglx@linutronix.de Subject: Re: [RFC 0/2] Add RISC-V cpu topology Message-ID: <20181109123338.GA8385@e107155-lin> References: <1541113468-22097-1-git-send-email-atish.patra@wdc.com> <866dedbc78ab4fa0e3b040697e112106@mailhost.ics.forth.gr> <20181106141331.GA28458@e107155-lin> <969fc2a5198984e0dfe8c3f585dc65f9@mailhost.ics.forth.gr> <20181106162051.w7fyweuxrl7ujzuz@lakrids.cambridge.arm.com> <20181107122803.GA8433@e107155-lin> <20181108164827.GB10953@e107155-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 09, 2018 at 04:36:19AM +0200, Nick Kossifidis wrote: > Στις 2018-11-08 18:48, Sudeep Holla έγραψε: [...] > we can keep it as is and mandate the nodes only for ARM64 as you > suggested. > Fine by me. [...] > > We have reasons why we can't assume information about cache or power > > domain topology from CPU topology. I have summarised them already and > > we are not discussing. > > But that's what you do on arch/arm/kernel/topology.c, you assume > information on power domain and cache topology based on the CPU topology > when you define the scheduling domain topology levels. > NO, we don't assume any knowledge about power domain and cache topology based on the CPU topology. We have updated scheduling domains for ACPI based systems and plan to do the same for DT. The current code may not be optimal. > PowerPC also does the same on arch/powerpc/kernel/smp.c and basically if > you track the usage of struct sched_domain_topology_level you'll see that > every arch that uses it to instruct the scheduler about the scheduling > domains, does it based on its CPU topology, which I think we both agree > is wrong. > Again, that's arch specific, so I can't comment on anything other than ARM. > > There may not be perfect bindings but there are > > already supported and nothing is broken here to fix. DT bindings are > > *not* same as code to fix it with a patch to the bindings themselves. > > Once agreed and merged, they need to be treated like user ABI. > > > > The only use of the devicetree spec bindings for caches if I'm not > mistaken are used on your cacheinfo driver for exporting them to userspace > through sysfs (thank you for cleaning this up btw). Even if we have the > cache topology using the generic bindings, we are not doing anything with > that information but export it to userspace. > OK, we may use LLC for sched domains in future, we do for ACPI systems. > As for the power domain bindings, we have drivers/base/power/domain.c that > handles the generic bindings and it's being used by some drivers to put > devices to power domains (something used by the pm code), but from a quick > search it's not used for cpu nodes and I didn't see this info being used > for providing hints to the scheduler either. Even with the generic power > domain bindings in place, for CPU idle states, on ARM we have another > binding that's basically the same with the addition of "wakeup-latency-us". > OK, it's just an extension. > For having different capacity there is no generic binding but I guess we > could use ARM's. > Better. > Of the generic bindings that relate to the scheduler's behavior, only the > numa binding is used as expected and only by ARM64, powerpc and sparc use > their own stuff. > Yes, PPC and SPARC has lots of Open Firmware base which is different from DT. > So there may be nothing broken regarding the generic / already existing > bindings, but their support needs fixing. The way they are now we can't > use them on RISC-V for configuring the scheduler and supporting SMT and > MC properly + I'm not in favor of using CPU topology blindly as the > other archs do. > Sure, if you want to improve support for the existing DT bindings that's fine. Happy to see the patches. DT bindings can be generic, you can still interpret and manage the sched domains in the best way for RISC-V. [...] > I mentioned the script as a transitioning method, but you are right, it goes > both ways. > Thanks :) > But I never said that's "the only solution and everything else is broken" ! > I'm just proposing an extension to cpu-map since Mark suggested that it's > possible. My goal is to try and consolidate cpu-map with what Atish proposed > for RISC-V (so that we can use the same code) and point out some issues > on how we use and define the CPU topology. > Good, we are in agreement here. > ACK, thanks a lot for your time and the discussion so far, I really > appreciate it. > No worries, glad if it helps. -- Regards, Sudeep