Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp433676pxp; Wed, 9 Mar 2022 05:56:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9IE7oWj7MgBqyCnBRliJA6FrcbjyMDZWjsEvi1vEWRM08PBlJKFxZM+bQuhgK20Kj9jjx X-Received: by 2002:a17:902:a50c:b0:14d:4e8b:d6f with SMTP id s12-20020a170902a50c00b0014d4e8b0d6fmr22838970plq.42.1646834175546; Wed, 09 Mar 2022 05:56:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646834175; cv=none; d=google.com; s=arc-20160816; b=FWVSU/fbclDYy1uDcSObhPLuGvtdZoYCyzosSAbIOWW0EyfG+uEdvjxdMlSqG8lZUp csgk2u6TEL72iSd2H2Qx9w1h3CUJKdjfmLTvgy7yvugFUBWyL3nUM7sWVowl+FZCnXn2 d3zhYz9xdVdWm4rT335Y/GGkR49wM8wj3AqvJJ9Tk+uzDP+yPHniqaX6iQMrU3LCxiJI GjrgJSBVU8NX8taIzWAaOkuMp4Qasx+k0xxQ7kSAKkiqz9SB5WV88fhJP5Q1m6GhvcCE 2+xi8ScB+p7FeC0wfaxR9tkkEjBJiZ6G+na+KyacSx0gpkyANesz7y0AoXY4pnaYup6b TNeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=j3PdTQaz+DTWMvBjHMCgraIga4CgEZKDLsqY1fCbNuE=; b=aPhsvezpQcGAqLF+H+kthQWz2Knp5UmnjYImEODNomQF5rbMEBxJBTGKngFSZSSQiL aH8aCaDIlLe8VSMxNUQNJREG0UIo6qqoOJIDtZAwOtZq6BTInxrQdCVWaWe84IQeAqoR EhI00WbeqISm9uvj6gJq42UT8TzSO9kVPJ2g+C+kNmQrpo+sjSEePBsF07JkSY6CUBp9 L/CsmgIVuOFFFQBwdJ+2LUwfIU/gYWML6WevyYY8divgx7E/+nt5rN9KD098czUq3Sx5 I2U7o+/IDcvG2QMZPayw8xhScTWG9icMWNSY5JcFbeh3JRJNwf+qHBCw53yixN0yG/LD pKRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q12-20020a170902f78c00b0014c91395314si1994152pln.60.2022.03.09.05.55.55; Wed, 09 Mar 2022 05:56:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232330AbiCIJz2 (ORCPT + 99 others); Wed, 9 Mar 2022 04:55:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230522AbiCIJz1 (ORCPT ); Wed, 9 Mar 2022 04:55:27 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8E56C10DA46; Wed, 9 Mar 2022 01:54:28 -0800 (PST) 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 554C31650; Wed, 9 Mar 2022 01:54:28 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 720D43FA4D; Wed, 9 Mar 2022 01:54:26 -0800 (PST) Date: Wed, 9 Mar 2022 09:54:24 +0000 From: Sudeep Holla To: Ionela Voinescu Cc: "Rafael J . Wysocki" , Sudeep Holla , Thomas Gleixner , Ingo Molnar , Giovanni Gherdovich , Catalin Marinas , Will Deacon , Valentin Schneider , Dietmar Eggemann , Sean Kelley , Pierre Gondois , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 2/3] arch_topology: obtain cpu capacity using information from CPPC Message-ID: References: <20220302180913.13229-1-ionela.voinescu@arm.com> <20220302180913.13229-3-ionela.voinescu@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220302180913.13229-3-ionela.voinescu@arm.com> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 02, 2022 at 06:09:12PM +0000, Ionela Voinescu wrote: > Define topology_init_cpu_capacity_cppc() to use highest performance > values from _CPC objects to obtain and set maximum capacity information > for each CPU. acpi_cppc_processor_probe() is a good point at which to > trigger the initialization of CPU (u-arch) capacity values, as at this > point the highest performance values can be obtained from each CPU's > _CPC objects. Architectures can therefore use this functionality > through arch_init_invariance_cppc(). > > The performance scale used by CPPC is a unified scale for all CPUs in > the system. Therefore, by obtaining the raw highest performance values > from the _CPC objects, and normalizing them on the [0, 1024] capacity > scale, used by the task scheduler, we obtain the CPU capacity of each > CPU. > > While an ACPI Notify(0x85) could alert about a change in the highest > performance value, which should in turn retrigger the CPU capacity > computations, this notification is not currently handled by the ACPI > processor driver. When supported, a call to arch_init_invariance_cppc() > would perform the update. > > Signed-off-by: Ionela Voinescu > Tested-by: Valentin Schneider > Cc: Sudeep Holla Looks good to me. FWIW, Acked-by: Sudeep Holla -- Regards, Sudeep