Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp816055imm; Fri, 29 Jun 2018 06:55:14 -0700 (PDT) X-Google-Smtp-Source: AAOMgpemw6MA1ULllEzUjjN1mb2OEnehiOcqHEGn24NY/3aQWxIMlBfTob7mriCr/7NOc2wAE/Ay X-Received: by 2002:a17:902:2702:: with SMTP id c2-v6mr13802389plb.297.1530280514603; Fri, 29 Jun 2018 06:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530280514; cv=none; d=google.com; s=arc-20160816; b=qfsOOQuvL1OiqOG38fTH3bQ/JHoGmt2OtarEDJUhsK8VMUYKR2Gllt6CajtOxB3EfL WGHi1eblrDI99a9P2UXslL06jQEFbi5hxmPlVAAi0k2KvIffPEBBn+f0jIXYVGps4/Ro SLD7qEBCyvEF4vK2w5Eulh0Dlccq0G07Ov4VNndIZEsZdWmCAQCJHgs2wjG0EnFIU932 DQZLj44+teKcesOsyaLXl11deTRJ4zay8Q7LlyBPuxLjYrhrn+arDZegfB5VyKBoa4bK O/t4cPUOMpAN0SGUx2ol8MYMaXd4satrx0b1SMsEiVNjg2q6z4IMPTK5lYvPq3pwJDA+ CSCA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=uAhM2chpOBka54c/UAdaDQae3oOKDDms4hALav7v04o=; b=PKm8rO3SLFDX29UMo9pgyxoWwMatzXZOVxKbdpJM23hJFwnSp59JXIF7JjsNPYQ2dz +hypdXgtyRK+35GyP14n7HqOd0VBYNnwvMnMdAZ6buZI4pR5H+iZkiDU6Eft8NKBJc25 NbsVaeIdenKuE+iQRpd6nZmRr+E/YaBAohG+rpkqTcXr+oq8o10Gvme1EBv/Q5g9BCOU yokv+KRh6Hkq3T2C4kvANBYiyVNY1Up2vTlAJ/7M0P/QVH4YRSeudfUN5/CQEWgJvh4E sBoaArKbO9sr2G0E2KVnglVmPxBX4x7bK4VnxqA70QUCXc+iDg0uTZ27p/PZ7PWnyDWb pi3g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1-v6si8381786pgn.42.2018.06.29.06.54.58; Fri, 29 Jun 2018 06:55:14 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935591AbeF2LYA (ORCPT + 99 others); Fri, 29 Jun 2018 07:24:00 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:52748 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932529AbeF2LX7 (ORCPT ); Fri, 29 Jun 2018 07:23:59 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 763EA87A4B; Fri, 29 Jun 2018 11:23:58 +0000 (UTC) Received: from kamzik.brq.redhat.com (unknown [10.43.2.160]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CB7732156700; Fri, 29 Jun 2018 11:23:56 +0000 (UTC) Date: Fri, 29 Jun 2018 13:23:54 +0200 From: Andrew Jones To: Sudeep Holla Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, jeremy.linton@arm.com, ard.biesheuvel@linaro.org, shunyong.yang@hxt-semitech.com, yu.zheng@hxt-semitech.com, catalin.marinas@arm.com, will.deacon@arm.com Subject: Re: [PATCH] arm64: acpi: reenumerate topology ids Message-ID: <20180629112354.hefdl2pe72frl6x3@kamzik.brq.redhat.com> References: <20180628145128.10057-1-drjones@redhat.com> <20180628173243.obydzakh2stfs26w@kamzik.brq.redhat.com> <20180629102927.GA18043@e107155-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180629102927.GA18043@e107155-lin> User-Agent: NeoMutt/20180622 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 29 Jun 2018 11:23:58 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 29 Jun 2018 11:23:58 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'drjones@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 29, 2018 at 11:29:27AM +0100, Sudeep Holla wrote: > On Thu, Jun 28, 2018 at 07:32:43PM +0200, Andrew Jones wrote: > > On Thu, Jun 28, 2018 at 05:30:51PM +0100, Sudeep Holla wrote: > > > I am not sure if we can ever guarantee that DT and ACPI will get the > > > same ids whatever counter we use as it depends on the order presented in > > > the firmware(DT or ACPI). So I am not for generating ids for core and > > > threads in that way. > > > > I don't believe we have to guarantee that the exact (package,core,thread) > > triplet describing a PE with DT matches ACPI. We just need to guarantee > > that each triplet we select properly puts a PE in the same group as its > > peers. So, as long as we keep the grouping described by DT or ACPI, then > > the (package,core,thread) IDs assigned are pretty arbitrary. > > > > If that's the requirement, we already do that. The IDs are just too > arbitrary :) Right. The patch doesn't fix anything, it just makes the IDs less weird looking to humans, and brings some consistency to IDs across systems and hardware descriptions. > > > I could change the commit message to state we can generate IDs *like* > > DT does (i.e. with counters), even if they may not result in identical > > triplet to PE mappings. > > > > Why we need to make it *like DT* ? Because the DT parser considers human readers, which, IMHO, is nicer. The consistency remapping to counters brings shouldn't be overlooked. If both ACPI and DT present the CPUs in the same order (i.e. cpu0 is mpidr0, cpu1 is mpidr1, ...) using their respective descriptions, then this patch will ensure topology IDs are the same. Also, when going from machine to machine, it's nice to expect package/core/thread-id to be within the same range and to vary by a set difference (1), rather than have IDs that increment by 20 on one system and by 160 on another, depending on how the ACPI table nodes are laid out. > > > > > > > So I would like to keep it simple and just have this counters for > > > package ids as demonstrated in Shunyong's patch. > > > > > > > If we don't also handle cores when there are threads, then the cores > > will also end up having weird IDs. > > > > Yes, but if PPTT says it has valid ID, I would prefer that over DT like > generated. Valid *ACPI* ID, which just means it's a guaranteed unique ACPI UID, which isn't likely going to be anything useful to a user. Thanks, drew