Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1673830pxj; Wed, 19 May 2021 11:09:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJB7I19cT0vSFNToaj7eMzB6iOYd7t+IPkoJlZpMstpaA9yuHUXiB3ucn7bkSRrB6bzNuC X-Received: by 2002:a05:6e02:1649:: with SMTP id v9mr319502ilu.62.1621447783845; Wed, 19 May 2021 11:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621447783; cv=none; d=google.com; s=arc-20160816; b=hhBQiy9sztvWMcU+gQK5cZS9lKqwVusGI33sLrRrGkqtlaIR5wEOgp5UyCAh82Dfs3 PRZzWIkvc6n3Qrc057JzxT8+QTG4yWozMUgYnxE5wuXRZqnq6jrwU62qZs1MkYrx4r/G UV8QLtxwxHWd3JvrfvpRwdh3X+3iOZKtp7lCy/1nR5aKcYeFt8qyLkIvTyFak7ocEKAc xq7d2Cy7XWA+1USx5CCkPIoTaX2ixqYWmyILxiLtR9Fu/1F5Y4RzI1KAQGEj7q5k0kOF sqwjJfb/gOZWngvFexB2SebNsAk1SvzBa082v/muDiw2uK1vDkHJTS8pLLc9OjG1kPz6 vK9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=ffLtiVQVOfwBXPVGZlXP7+7F7MTjymPH0KhszwjU2IA=; b=Hd5qiJupUj6paBYhD8ViJSHmVb+18hk7Da3uwirfdzyhtJv2hNWCuzAsGRerSWzJj/ 9WPvZywVIjYvdyQE3q98ABd/Ls7pfryO6tLNaa02oZ/K+Q+RuLbBsi/0hgEoc11mPUmC 0kj5BxeCADuazlB3M4mxU1BoW3p8zG7lMxvJW7xR1qgYd4A2LFHtefBZUoYhacIej1f4 vcE5DWUC0p28mqP2bzttUSA0Oo2NRNFa0cESS4j8B9v6+d1/HWwDd6LGqzrKwtkaekt9 IGyY7V37/cXvPgC5IQ/Z/kff8MJZnCT4+kN8PzACDWVSlzVdq4hcikWtSyxqqfTm9WZR lJ1Q== 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 d8si723675iob.68.2021.05.19.11.09.31; Wed, 19 May 2021 11:09:43 -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 S1349461AbhERNN3 (ORCPT + 99 others); Tue, 18 May 2021 09:13:29 -0400 Received: from foss.arm.com ([217.140.110.172]:51732 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231490AbhERNN3 (ORCPT ); Tue, 18 May 2021 09:13:29 -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 31A93D6E; Tue, 18 May 2021 06:12:11 -0700 (PDT) Received: from e113632-lin (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B68D83F73B; Tue, 18 May 2021 06:12:09 -0700 (PDT) From: Valentin Schneider To: Ionela Voinescu , Sudeep Holla , "Rafael J . Wysocki" , Thomas Gleixner , Ingo Molnar , Giovanni Gherdovich , Catalin Marinas , Will Deacon Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 0/3] arch_topology, ACPI: populate cpu capacity from CPPC In-Reply-To: <20210514095339.12979-1-ionela.voinescu@arm.com> References: <20210514095339.12979-1-ionela.voinescu@arm.com> Date: Tue, 18 May 2021 14:12:03 +0100 Message-ID: <87fsyk190c.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 14/05/21 10:53, Ionela Voinescu wrote: > Hi all, > > These are a few trivial patches to populate cpu capacity information > using performance information from ACPI's CPPC. > > I've tied this functionality to the existing function > init_freq_invariance_cppc() called in acpi_cppc_processor_probe(). > This function is renamed to a more generic arch_init_invariance_cppc(). > > The patches have been build tested on x86 and more thoroughly tested on > Juno R2 (arm64), which uses the new functionality, with the following > results: > > > root@ubuntu:~# dmesg | grep cpu_capacity > [ 2.157494] init_cpu_capacity_cppc: CPU0 cpu_capacity=38300 (raw). > [ 2.163699] init_cpu_capacity_cppc: CPU1 cpu_capacity=38300 (raw). > [ 2.169899] init_cpu_capacity_cppc: CPU2 cpu_capacity=38300 (raw). > [ 2.176098] init_cpu_capacity_cppc: CPU3 cpu_capacity=38300 (raw). > [ 2.182296] init_cpu_capacity_cppc: CPU4 cpu_capacity=102400 (raw). > [ 2.188581] init_cpu_capacity_cppc: CPU5 cpu_capacity=102400 (raw). > [ 2.194867] cpu_capacity: capacity_scale=102400 > [ 2.199409] cpu_capacity: CPU0 cpu_capacity=383 > [ 2.203952] cpu_capacity: CPU1 cpu_capacity=383 > [ 2.208495] cpu_capacity: CPU2 cpu_capacity=383 > [ 2.213037] cpu_capacity: CPU3 cpu_capacity=383 > [ 2.217580] cpu_capacity: CPU4 cpu_capacity=1024 > [ 2.222209] cpu_capacity: CPU5 cpu_capacity=1024 > [ 2.226886] init_cpu_capacity_cppc: cpu_capacity initialization done > > root@ubuntu:~# tail -n +1 /sys/devices/system/cpu/cpu*/cpu_capacity > ==> /sys/devices/system/cpu/cpu0/cpu_capacity <== > 383 > ==> /sys/devices/system/cpu/cpu1/cpu_capacity <== > 383 > ==> /sys/devices/system/cpu/cpu2/cpu_capacity <== > 383 > ==> /sys/devices/system/cpu/cpu3/cpu_capacity <== > 383 > ==> /sys/devices/system/cpu/cpu4/cpu_capacity <== > 1024 > ==> /sys/devices/system/cpu/cpu5/cpu_capacity <== > 1024 > > All works as expected even if ACPI processor support is built as a > module. > Tested on my Ampere eMAG; this all seems to work fine except for some scheduler debug stuff that gets confused; see http://lore.kernel.org/r/20210518130725.3563132-1-valentin.schneider@arm.com With that in mind: Tested-by: Valentin Schneider