Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 302E6C433F5 for ; Thu, 25 Nov 2021 15:06:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232861AbhKYPJP (ORCPT ); Thu, 25 Nov 2021 10:09:15 -0500 Received: from smtp-out1.suse.de ([195.135.220.28]:35160 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232933AbhKYPHN (ORCPT ); Thu, 25 Nov 2021 10:07:13 -0500 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id BC3C82193C; Thu, 25 Nov 2021 15:04:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1637852640; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=77jlTeIrtkwCzy1kBCLb2SkHLxssS+UT50zrqiIuDCE=; b=nB6wG5CTmkack7MIOO4HUjUSBi9EmPoIG+CyFjR6tLSnoSiMpX20EM+91hF71rKprFrPbu DxcaHI7RN3xAstWtvfIR/CNhxu8zzIv2NyBpuIVN5qbIuFM3pcWzi6uWNjGyOxpWD7oWJ3 sF+T3fZGsiOoBkeznRXYFLLaojXE4iQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1637852640; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=77jlTeIrtkwCzy1kBCLb2SkHLxssS+UT50zrqiIuDCE=; b=0H+ysMseQxltEVifW5+dcWbngxRFEsXHDOIOqUkzKUIrGrcWiIl7vGRIm87TBmGRj3hEDX oseRP/AwU3S9LsDg== Received: from [10.163.29.78] (unknown [10.163.29.78]) by relay2.suse.de (Postfix) with ESMTP id 0D15DA3B87; Thu, 25 Nov 2021 15:04:00 +0000 (UTC) Message-ID: Subject: Re: [PATCH v4 06/22] cpufreq: amd: introduce a new amd pstate driver to support future processors From: Giovanni Gherdovich To: Huang Rui , "Rafael J . Wysocki" , Viresh Kumar , Shuah Khan , Borislav Petkov , Peter Zijlstra , Ingo Molnar , linux-pm@vger.kernel.org Cc: Deepak Sharma , Alex Deucher , Mario Limonciello , Steven Noonan , Nathan Fontenot , Jinzhou Su , Xiaojian Du , linux-kernel@vger.kernel.org, x86@kernel.org Date: Thu, 25 Nov 2021 16:03:58 +0100 In-Reply-To: <20211119103102.88124-7-ray.huang@amd.com> References: <20211119103102.88124-1-ray.huang@amd.com> <20211119103102.88124-7-ray.huang@amd.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2021-11-19 at 18:30 +0800, Huang Rui wrote: > > > Performance Per Watt (PPW) Calculation: > > The PPW calculation is referred by below paper: > https://software.intel.com/content/dam/develop/external/us/en/documents/performance-per-what-paper.pdf > > Below formula is referred from below spec to measure the PPW: > > (F / t) / P = F * t / (t * E) = F / E, > > "F" is the number of frames per second. > "P" is power measured in watts. > "E" is energy measured in joules. Hello, I'd appreciate if you can remove the reference to the above paper and formula, because it is not really relevant to this context, and ends up being confusing. It describes performance per watt tailored to graphics benchmarks, in the form of frames per joule. Nothing wrong with that, but it only works for tests that measure frames per second, and none of the tests below is of that type. You have: - tbench measures throughput (MB/sec) - gitsource, aka run the git test suite, measures elapsed time - speedometer, a web browser test that gives "runs per minute" If you want performance per watt, you need to express your result as "operations per second", where "operations" is up to you to define. For tbench, one "operation" is moving a MB of data. For speedometer, one "operation" is one "run", as defined in the benchmark. Once you have op/sec (aka performance), divide by the average power measured over the entire duration of the benchmark. In cases like gitsource, where you have elapsed_time as a result, performance per watt is 1 / (elapsed_time * average_power). > We use the RAPL interface with "perf" tool to get the energy data of the > package power. > > The data comparisons between amd-pstate and acpi-freq module are tested on > AMD Cezanne processor: > > 1) TBench CPU benchmark: > > +---------------------------------------------------------------------+ > > | > > TBench (Performance Per Watt) | > > Higher is better | > +-------------------+------------------------+------------------------+ > > | Performance Per Watt | Performance Per Watt | > > Kernel Module | (Schedutil) | (Ondemand) | > > | Unit: MB / (s * J) | Unit: MB / (s * J) | The unit "MB / (s * J)" doesn't really work, it should be "MB / (sec * watt)". Can you double check that you divided the performance result by the average power? Same for the other tests. It is also relevant to show performance, alongside with perf-per-watt. Thanks! Giovanni