Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp107993pxu; Tue, 6 Oct 2020 01:53:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbb5AshgO4oUqCjqn0pW9S1XWuAm0WkR1oFPZ7znA2fs4fKBnFBIUE887Ml9YL/+ANxYb2 X-Received: by 2002:a17:906:3ac5:: with SMTP id z5mr4093939ejd.46.1601974408522; Tue, 06 Oct 2020 01:53:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601974408; cv=none; d=google.com; s=arc-20160816; b=Iviatf/U4bNFfb42co/JT0uIWOFF33Xe+ARC4BmA/esEVmVFHTBsZVsD7Yn2/BnAFL t6BPsUPOAkh9qKBcFH8Aq2CukHy8qJsQsF9w3pMfqF/ZIC7s4B8K6cO0KTMw5yRk3AOJ gJcL6Oay8Cbks3MKTcO3/0+anByJm97B+h0hqsjrS1lDJaprn+Y3nPj/v3LY1msdbExk QoEYtPVa4sWK57ateKoUtREtra3dA9L210bmBjLft8ZE190dnBxl+NFbrw/pxnEsM2Q2 Jbyckl1AwYhmUlexm+uCEccLhV+8ySbu0eT3QRIf7ycDEIeT3eFJBOc+lBIqESwWsrqP OMmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=cv0jnp33vl+nMELMxr53LAHGQUwMSa1Z1WjMZ+AYio8=; b=tN0zizXf98vM/8qS3WlabjVgDuTHch/yZKO1qQdyWXC5R6FR8Qx38PU9L/APEEmN4r 4fqLZFonwNpipb8wqNJKk331T9rxnTRFBPAsj1eU5/qLrjjr++eolDnw1DbOevyYNSQl qDpoDBm6bYQPRNuxzUqFlyK5IJ9NZCk6oq9dZ8A5Mk6Vv/wO9Gsm+UETJ3k3GRaien48 F2FYiLkoDZDrEwe74ZPcEVpA5fEZP87J+/5ESt6UfheyOsz+IcZiyHm63LGoJQLg19we a62YQJhEO6ZzbhV4QsKSDjL3ZV5TW4A7L6cFMILwIuBmRM4cUDXFWb/esjRe8WLb/CX/ U6sQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mj7si1654798ejb.531.2020.10.06.01.53.05; Tue, 06 Oct 2020 01:53:28 -0700 (PDT) Received-SPF: pass (google.com: 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; spf=pass (google.com: 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725946AbgJFIv6 (ORCPT + 99 others); Tue, 6 Oct 2020 04:51:58 -0400 Received: from foss.arm.com ([217.140.110.172]:42224 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725912AbgJFIv6 (ORCPT ); Tue, 6 Oct 2020 04:51:58 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9659A113E; Tue, 6 Oct 2020 01:51:57 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CCBB13F71F; Tue, 6 Oct 2020 01:51:55 -0700 (PDT) Date: Tue, 6 Oct 2020 09:51:53 +0100 From: Qais Yousef To: Ricardo Neri Cc: Greg Kroah-Hartman , x86@kernel.org, Borislav Petkov , Ingo Molnar , Thomas Gleixner , "Rafael J. Wysocki" , Tony Luck , Len Brown , "Ravi V. Shankar" , linux-kernel@vger.kernel.org, Dietmar Eggemann , Morten Rasmussen , Quentin Perret Subject: Re: [PATCH 0/4] drivers core: Introduce CPU type sysfs interface Message-ID: <20201006085152.tro3cypebbyw4ng7@e107158-lin.cambridge.arm.com> References: <20201003011745.7768-1-ricardo.neri-calderon@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20201003011745.7768-1-ricardo.neri-calderon@linux.intel.com> User-Agent: NeoMutt/20171215 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ricardo Adding some people who might be interested. On 10/02/20 18:17, Ricardo Neri wrote: > Hybrid CPU topologies combine processors with more than one type of > micro-architecture. Hence, it is possible that individual CPUs support > slightly different features (e.g., performance counters) and different > performance properties. Thus, there may be user space entities interested > in knowing the topology of the system based on the types of available > CPUs. > > Currently, there exists an interface for the CPU capacity (/sys/devices/ > system/cpu/cpuX/cpu_capacity). However, CPU capacity does not always map > to CPU types (by the way, I will submit a separate series to bring such > interface to x86). Why do you need to do this mapping? > > This series proposes the new interface /sys/devices/system/cpu/types > which, in hybrid parts, creates a subdirectory for each type of CPU. > Each subdirectory contains a CPU list and a CPU map that user space can > query. Why user space needs to query this info? The rationale is missing the intention behind all of this. It seems you're expecting software to parse this info and take decisions based on that? Thanks -- Qais Yousef > > Patch 1 of the series proposes the generic interface, with hooks > that architectures can override to suit their needs. The three patches > patches implement such interface for x86 (as per request from Boris, > I pulled patch 2 from a separate submission [1]). > > Thanks and BR, > Ricardo > > [1]. https://lkml.org/lkml/2020/10/2/1013 > > Ricardo Neri (4): > drivers core: Introduce CPU type sysfs interface > x86/cpu: Describe hybrid CPUs in cpuinfo_x86 > x86/cpu/intel: Add function to get name of hybrid CPU types > x86/cpu/topology: Implement the CPU type sysfs interface > > .../ABI/testing/sysfs-devices-system-cpu | 13 ++ > arch/x86/include/asm/intel-family.h | 4 + > arch/x86/include/asm/processor.h | 13 ++ > arch/x86/include/asm/topology.h | 2 + > arch/x86/kernel/cpu/common.c | 3 + > arch/x86/kernel/cpu/cpu.h | 3 + > arch/x86/kernel/cpu/intel.c | 23 ++ > arch/x86/kernel/cpu/topology.c | 23 ++ > drivers/base/cpu.c | 214 ++++++++++++++++++ > include/linux/cpu.h | 12 + > include/linux/cpuhotplug.h | 1 + > 11 files changed, 311 insertions(+) > > -- > 2.17.1 >