Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2173409imu; Tue, 6 Nov 2018 10:08:10 -0800 (PST) X-Google-Smtp-Source: AJdET5cbUsRudl2blRa6To8zahtiHF38WfV9rttPHZJ9goDoSts2e9moFf8l049DyZMBRvbk26G5 X-Received: by 2002:a17:902:780f:: with SMTP id p15-v6mr26845707pll.197.1541527690714; Tue, 06 Nov 2018 10:08:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541527690; cv=none; d=google.com; s=arc-20160816; b=hFNKRoP1TrJAUFkjS9KrwqnCxjdcJHvviuXn+Aq7l3putTpN39DzQvz86DRlrrm+q4 for7lPdGgwNi0TBS8DMsj89vmBYovokcCxisvRcFnINPJDbt5q3o2n6dlw8I3vwlymKk E4bNoABzOl6SNZ/palqpUZzpMUHzpYuO8wsStSEzlWp9MsRjf+zGfC+rvABharnNvULf l1/imikUfjaVaLtRn1dD2jOgUu2dMvNK8sjNbAEXN6sR2RwGLmO2Iz8V8kQmSxWuFRe7 58cXyDNIFmPXv4N2XKVd3XSyFxPNwfnG5/TfnmSoDbaBnfvlamIKLSXgIr3UxX2U2I5/ G1BA== 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=smgDTmTANi8FVLv6CezXo/6FBPl8/fAUUf3mLuHu2KQ=; b=02pzno7YKJPL/3Dm0urqmUoEJjyXeWj+gipxejsBp9wixBmHft0qjOKPtJBIrwBisE ZRv18Rwydyhm6g6wUZ5TOPOEmhLRCIxuJsoeP7LgWQmcQAeT/5mP5GqhUFiXiwmswiFL 96W28fx2DB6XGFXe22oxqpiho35IPJfJ4Re7zzcCDsxCgg5TOYtD4O3TKsNnfUU9FH0U HGwZ/B2kt30JHVR9RweFpBi5eldkmll8OavWh78hCaqGK1nHxLkTUaTRZJenxyf4vlEZ MC/zItKUDKEVEEwy0jujj8NiqGo25e2ehaDz+95iTaxRda4GlkDseZXlPfyp8OfACqga 2O/w== 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 h9si17838521pgb.319.2018.11.06.10.07.55; Tue, 06 Nov 2018 10:08:10 -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 S2388711AbeKFXjX (ORCPT + 99 others); Tue, 6 Nov 2018 18:39:23 -0500 Received: from foss.arm.com ([217.140.101.70]:34456 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388477AbeKFXjX (ORCPT ); Tue, 6 Nov 2018 18:39:23 -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 E018180D; Tue, 6 Nov 2018 06:13:57 -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 649B03F5BD; Tue, 6 Nov 2018 06:13:55 -0800 (PST) Date: Tue, 6 Nov 2018 14:13:49 +0000 From: Sudeep Holla To: Nick Kossifidis Cc: Atish Patra , linux-riscv@lists.infradead.org, mark.rutland@arm.com, 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, Sudeep Holla Subject: Re: [RFC 0/2] Add RISC-V cpu topology Message-ID: <20181106141331.GA28458@e107155-lin> References: <1541113468-22097-1-git-send-email-atish.patra@wdc.com> <866dedbc78ab4fa0e3b040697e112106@mailhost.ics.forth.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <866dedbc78ab4fa0e3b040697e112106@mailhost.ics.forth.gr> 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 02, 2018 at 08:58:39PM +0200, Nick Kossifidis wrote: > Hello All, > > Στις 2018-11-02 01:04, Atish Patra έγραψε: > > This patch series adds the cpu topology for RISC-V. It contains > > both the DT binding and actual source code. It has been tested on > > QEMU & Unleashed board. > > > > The idea is based on cpu-map in ARM with changes related to how > > we define SMT systems. The reason for adopting a similar approach > > to ARM as I feel it provides a very clear way of defining the > > topology compared to parsing cache nodes to figure out which cpus > > share the same package or core. I am open to any other idea to > > implement cpu-topology as well. > > > > I was also about to start a discussion about CPU topology on RISC-V > after the last swtools group meeting. The goal is to provide the > scheduler with hints on how to distribute tasks more efficiently > between harts, by populating the scheduling domain topology levels > (https://elixir.bootlin.com/linux/v4.19/ident/sched_domain_topology_level). > What we want to do is define cpu groups and assign them to > scheduling domains with the appropriate SD_ flags > (https://github.com/torvalds/linux/blob/master/include/linux/sched/topology.h#L16). > OK are we defining a CPU topology binding for Linux scheduler ? NACK for all the approaches that assumes any knowledge of OS scheduler. > So the cores that belong to a scheduling domain may share: > CPU capacity (SD_SHARE_CPUCAPACITY / SD_ASYM_CPUCAPACITY) > Package resources -e.g. caches, units etc- (SD_SHARE_PKG_RESOURCES) > Power domain (SD_SHARE_POWERDOMAIN) > Too Linux kernel/scheduler specific to be part of $subject > In this context I believe using words like "core", "package", > "socket" etc can be misleading. For example the sample topology you > use on the documentation says that there are 4 cores that are part > of a package, however "package" has a different meaning to the > scheduler. Also we don't say anything in case they share a power > domain or if they have the same capacity or not. This mapping deals > only with cache hierarchy or other shared resources. > {Un,}fortunately those are terms used by hardware people. > How about defining a dt scheme to describe the scheduler domain > topology levels instead ? e.g: > NACK as already mentioned above. -- Regards, Sudeep