From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23F63C433E6 for ; Mon, 22 Feb 2021 11:06:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ADD3E64EC3 for ; Mon, 22 Feb 2021 11:05:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ADD3E64EC3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4sUxoGbrqE5v/X/9vrIc5DKRmxJ48BHvxq4yhHlq9Yw=; b=Rm5iKqqkX1hF7OVhpsnh4UAH4 rueDcqvPkYaZbZZg5XnwvkrSIN5fYnxLal08s8EOokZNg1l65ka+PFGMDh6JBTURBePhaK6sxGsgX oxf/kGY6bdIpqCBGS0cuOKQ0sCXlRWfCPf9DtCbVA+Pg7bEcCzV+GQqALps+X94YX37qzf2O9+Gb1 hST45EQb9t5cE6iiFTC/Z0NrPu/rxapiwZDfDOeMHJILFhK6OXwto32zxKOZ+6TCrNuKB6oVHOZos F/SHX5fMR0iLBUV3cN44+Pep1q0Wijj8yQkrIjXmrgjol5728C5Suc6dmzYuWYPrhlK1jVH+nFyMS N6jCjt+sA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lE91K-0002iz-T4; Mon, 22 Feb 2021 11:04:54 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lE91I-0002i2-4W for linux-arm-kernel@lists.infradead.org; Mon, 22 Feb 2021 11:04:53 +0000 Received: by mail-pg1-x532.google.com with SMTP id 75so9988925pgf.13 for ; Mon, 22 Feb 2021 03:04:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+rcTBMZKhMdES3Cywg/Y8Lt4YKUTAgAp6AlCWuyPtcQ=; b=VGTg6aQRkSvcbll2r22P+d3EZH6WF1awpGJZs+/XhKQkdxoGqORsC4fbhqacMlTxQz SK6H/6X4MMJntSvc/0Fzf/3t3GSUdJCv0uoRVMleTN7h5+9Wfcel+1pllVIl5O/TChVs hRkFuByTu6G4/DFRRonn6pP9uaXrEx38ucAG7Vlz7Ne3ql2TWsADUW0hOyIf+jX6JWT+ uj/Jf9rsYgr6v0Z9jFCsqDVw19FOe7xWgcWJQwQ24MTJhPVwO83lJ0vDXSuErNngEj8y ot5WMXv6lUR/xCEy8ymb3VpJWoKa/A26gK+P0z3SkUzmpcyWrQeTaJsluUBKjbnd2tUR RyGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+rcTBMZKhMdES3Cywg/Y8Lt4YKUTAgAp6AlCWuyPtcQ=; b=EuuwR+njwzz+oqDGNSfvktlp6ZvgE09/S1ZXDLfQkN6m4KSYZDFPkqtZ90t7uKUgAv w/5GFK6FHPfzhAFkUByRkabjr5x5ICuAQTXZLo4QKgjIcD8AjWXitZ+8ip2U0K1h5J2n Jp1Ca6knSC55ISfdlP2T55zwawmzBvs2bu+1aOxP0k1EGLBSqfp1thgQkkwDK0AV616t brWwpuxb3rjxeeT1eAxc1WYBIUySlM8XR36qLFY0UduFKNdeer1LrzrhL+D5kC2A2fMz 4oZym0UvTYxD8HP06X0EgZ0PUZ/MkOTwzM3PuherHcrqI8+gs5YOY8xvtVyoon1zc/Zu acmw== X-Gm-Message-State: AOAM5321qe3R+c8ZUCQ1HTolpYxcjbZBNNnjBrUFAwjuzlYN6ts3S4Eg LgQc0GV4SGfNEL9c2PbX+ckKbw== X-Google-Smtp-Source: ABdhPJygKT+iXaHBzplZf5PU+PiqXdLVpAhUD2i3pk6WLSAdWbGYk1+8vS3jnjkwVdEjU0AC0N4XKQ== X-Received: by 2002:aa7:8d8e:0:b029:1d1:f9c9:cff6 with SMTP id i14-20020aa78d8e0000b02901d1f9c9cff6mr21924773pfr.31.1613991888990; Mon, 22 Feb 2021 03:04:48 -0800 (PST) Received: from localhost ([122.172.59.240]) by smtp.gmail.com with ESMTPSA id q2sm7707116pfl.158.2021.02.22.03.04.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Feb 2021 03:04:48 -0800 (PST) Date: Mon, 22 Feb 2021 16:34:46 +0530 From: Viresh Kumar To: Ionela Voinescu Subject: Re: [PATCH V3 2/2] cpufreq: cppc: Add support for frequency invariance Message-ID: <20210222110446.boq5at3nmu6k4udt@vireshk-i7> References: <59f48538545d080cb1c7b201d2d779ab513d2c0c.1611829953.git.viresh.kumar@linaro.org> <20210218163538.GA3105@arm.com> <20210222110023.GB4499@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210222110023.GB4499@arm.com> User-Agent: NeoMutt/20180716-391-311a52 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210222_060452_501142_3478B71D X-CRM114-Status: GOOD ( 21.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vincent Guittot , linux-pm@vger.kernel.org, Catalin Marinas , Rafael Wysocki , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Sudeep Holla , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 22-02-21, 11:00, Ionela Voinescu wrote: > Hey, > > Some test results: Nice, I haven't responded earlier as Vincent was also testing the stuff out later last week and was planning to do it more this week. > On Thursday 18 Feb 2021 at 16:35:38 (+0000), Ionela Voinescu wrote: > [..] > > > +static void __init cppc_freq_invariance_init(void) > > > +{ > [..] > > > + > > > + ret = cppc_get_perf_ctrs(i, &fb_ctrs); > > > + if (!ret) > > > + per_cpu(cppc_fi->prev_perf_fb_ctrs, i) = fb_ctrs; > > > > After fixing this one: > cppc_fi->prev_perf_fb_ctrs = fb_ctrs; Yeah, I already fixed it and made several changes based on your feedback. > I got the following: > > Platform: > > - Juno R2 (CPUs [0-3] are littles, CPUs [4-5] are bigs) > + PMU counters, used by CPPC through FFH > + userspace/schedutil > > > - Verifying that with userspace governor we see a correct change in > scale factor: > > root@buildroot:~# dmesg | grep FIE > [ 6.436770] AMU: CPUs[0-3]: AMU counters WON'T be used for FIE. > [ 6.436962] AMU: CPUs[4-5]: AMU counters WON'T be used for FIE. > [ 6.451510] CPPC:CPUs[0-5]: CPPC counters will be used for FIE. > > root@buildroot:~# echo 600000 > policy4/scaling_setspeed > [ 353.939495] CPU4: Invariance(cppc) scale: 512. > [ 353.939497] CPU5: Invariance(cppc) scale: 512. > > root@buildroot:~# echo 1200000 > policy4/scaling_setspeed > [ 372.683511] CPU5: Invariance(cppc) scale: 1024. > [ 372.683518] CPU4: Invariance(cppc) scale: 1024. > > root@buildroot:~# echo 450000 > policy0/scaling_setspeed > [ 641.495513] CPU2: Invariance(cppc) scale: 485. > [ 641.495514] CPU1: Invariance(cppc) scale: 485. > [ 641.495517] CPU0: Invariance(cppc) scale: 485. > [ 641.495542] CPU3: Invariance(cppc) scale: 485. > > root@buildroot:~# echo 950000 > policy0/scaling_setspeed > [ 852.015514] CPU2: Invariance(cppc) scale: 1024. > [ 852.015514] CPU1: Invariance(cppc) scale: 1024. > [ 852.015517] CPU0: Invariance(cppc) scale: 1024. > [ 852.015541] CPU3: Invariance(cppc) scale: 1024. Great. > - I ran some benchmarks as well (perf, hackbench, dhrystone) on the same > platform, using the userspace governor at fixed frequency, to evaluate > the impact of the work we do or don't do on the tick. > > ./perf bench sched pipe > (10 iterations, higher is better, ops/s, comparisons with > cpufreq-based FIE) > > cpufreq-based FIE AMU-based FIE CPPC-based FIE > ---------------------------------------------------- > 39498.8 40984.7 38893.4 > std: 3.766% std: 4.461% std: 0.575% > diff: 3.625% diff: -1.556% > > ./hackbench -l 1000 > (10 iterations, lower is better, seconds, comparison with > cpufreq-based FIE) > > cpufreq-based FIE AMU-based FIE CPPC-based FIE > ---------------------------------------------------- > 6.4207 6.3386 6.7841 > std: 7.298% std: 2.252% std: 2.460% > diff: -1.295% diff: 5.356% > > This shows a small regression for the CPPC-based FIE, but within the > standard deviation. > > I ran some dhrystone benchmarks (./dhrystone -t 2/34/5/6/ -l 5000) as > well with schedutil governor to understand if an increase in accuracy > with the AMU/CPPC counters makes a difference. Given the > characteristics of the platform it's no surprise that the results > were very similar between the three cases, so I won't bore you with > the numbers. Nice, I have much more confidence on this stuff now :) Thanks a lot Ionela, I will resend the series again today then. -- viresh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel