Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp590038ybp; Fri, 4 Oct 2019 01:36:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1fR2iY+41Y0xzXma4No0IQt33lSFluaZPGEN7IVsJG0+qGZTw5n6A97kd/Oy8p7ehJnCJ X-Received: by 2002:a17:906:4801:: with SMTP id w1mr11262998ejq.245.1570178185032; Fri, 04 Oct 2019 01:36:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570178185; cv=none; d=google.com; s=arc-20160816; b=UWCn2WiRd0qk+hdz7s2O3Swl0nbi9uS8mFk9AHQZABtcO5AC9BSNGSIx5F/NPWzD9L DWNSw9s3MxyzZw+jb3Fs2vIzFEUcV2zF8Oeyn8a6DjAmFv/Gdy9JfrJg6dLgLRH09HIF 7ugcHSqFz8LKGrhcB67wZ8ViUIs625gfTDuqTvkCbF9UiuVCwV5W9huHIR4mv4PvLf2s S70kIyYDwSOxSPAsdx3ZtOknaIPCX24qgUZNb2RoSh8qr2NituGs5oggXZuKSFsv35Ln t65P0AdPt039NvB0P+iXBisEydd7mTpraCyW+uwGFVy6Qv1TYamMBNu1TIXfDOYJU8dn af1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=Ld1X7lbISkCrGFf+99YQWnlVcdBMNf7XxUB1bfdwTh0=; b=TkYuOg4JpOOMyja9D3v/cW81ZMLmC1IUjAOlTSqW7JeidD4Dm9fFTSDDJpsHLcxI/8 oPjQlmspZOGdRJfem2Q1MXrRYLwEJOSxSSUojS1SOz+WiNAl9ggUkYYnXLlK6ufyeLTm 0+KfZT6/29bOPCKhRwMMFNh1+z5yLY674cp877bjK1LWFu4W1EiZI8vFMDk4Jbyi7LnG zqkhpXQP2hL24LjVle6zkAlEU8sJHmsHqUltGI+IDcOXK/DxvpAHOIZT5ugsCx5h5Awi Tu1xpzUMawNBLafuL/LlTcHm97q95eV8IvRih2A8P0ynwMQMCOrXo1N8eNtOzTG5w38Z aLWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ch10si2426642ejb.89.2019.10.04.01.36.00; Fri, 04 Oct 2019 01:36:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730377AbfJDIeJ (ORCPT + 99 others); Fri, 4 Oct 2019 04:34:09 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:37537 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727484AbfJDIeJ (ORCPT ); Fri, 4 Oct 2019 04:34:09 -0400 Received: by mail-ot1-f66.google.com with SMTP id k32so4651925otc.4; Fri, 04 Oct 2019 01:34:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ld1X7lbISkCrGFf+99YQWnlVcdBMNf7XxUB1bfdwTh0=; b=saz7H5ZziAdFQkJCa6xbnhPbE3ktONZ7Plf7S1nOvkCukHuKamTryNl9Ccmm73M4xQ 6zL1yJQJeQHEKZefSPwpPyk0g1yXq/dFu55nbLxlcELDIRXHSQBpxV2EJiWhRex6EEYc Xbwx94l3mNmECMF2nXcwwHAwp16q4UZn0OzYOjlYqly/x0KSSMxb2HHtCYea5b4H4g0v FR97AuzNc2uXyAZqFHq3nLMZtncbg/l2bHn3XGkRScDIkiUD+/bIQiI/Jm1yoUdMFizx awjTI+Wk7kblvig3Ul4K8O4i6lzFqfnTVDPhjoRo8N8DKMOj/wF4qoNzqkHwl2f1moFR Ru2g== X-Gm-Message-State: APjAAAWS5AvL8fMZTegsuvsbAnPBcUSoUSLLxJgmC9+LV2EKS9jlhzZx vkuVRR9GzZPSmutCuvCk3gqKmqB+SH2s9kxcEsc= X-Received: by 2002:a9d:6a16:: with SMTP id g22mr9317222otn.118.1570178046805; Fri, 04 Oct 2019 01:34:06 -0700 (PDT) MIME-Version: 1.0 References: <20191002122926.385-1-ggherdovich@suse.cz> <20191002122926.385-3-ggherdovich@suse.cz> <13106850.QMtCbivBLn@kreacher> <5d6d601d2647644238fc51621407061e1c29320d.camel@linux.intel.com> <1570177786.30086.1.camel@suse.cz> In-Reply-To: From: "Rafael J. Wysocki" Date: Fri, 4 Oct 2019 10:33:55 +0200 Message-ID: Subject: Re: [PATCH v2 2/2] cpufreq: intel_pstate: Conditional frequency invariant accounting To: Vincent Guittot Cc: Giovanni Gherdovich , Srinivas Pandruvada , "Rafael J. Wysocki" , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Borislav Petkov , Len Brown , "the arch/x86 maintainers" , "open list:THERMAL" , linux-kernel , Mel Gorman , Matt Fleming , Viresh Kumar , Juri Lelli , Paul Turner , Quentin Perret , Dietmar Eggemann , Doug Smythies Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 4, 2019 at 10:28 AM Vincent Guittot wrote: > > On Fri, 4 Oct 2019 at 10:24, Giovanni Gherdovich wrote: > > > > On Thu, 2019-10-03 at 20:31 -0700, Srinivas Pandruvada wrote: > > > On Thu, 2019-10-03 at 20:05 +0200, Rafael J. Wysocki wrote: > > > > On Wednesday, October 2, 2019 2:29:26 PM CEST Giovanni Gherdovich > > > > wrote: > > > > > From: Srinivas Pandruvada > > > > > > > > > > intel_pstate has two operating modes: active and passive. In "active" > > > > > mode, the in-built scaling governor is used and in "passive" mode, the > > > > > driver can be used with any governor like "schedutil". In "active" mode > > > > > the utilization values from schedutil is not used and there is a > > > > > requirement from high performance computing use cases, not to readas > > > > > well any APERF/MPERF MSRs. > > > > > > > > Well, this isn't quite convincing. > > > > > > > > In particular, I don't see why the "don't read APERF/MPERF MSRs" argument > > > > applies *only* to intel_pstate in the "active" mode. What about > > > > intel_pstate in the "passive" mode combined with the "performance" > > > > governor? Or any other governor different from "schedutil" for that > > > > matter? > > > > > > > > And what about acpi_cpufreq combined with any governor different from > > > > "schedutil"? > > > > > > > > Scale invariance is not really needed in all of those cases right now > > > > AFAICS, or is it? > > > > > > Correct. This is just part of the patch to disable in active mode > > > (particularly in HWP and performance mode). > > > > > > But this patch is 2 years old. The folks who wanted this, disable > > > intel-pstate and use userspace governor with acpi-cpufreq. So may be > > > better to address those cases too. > > > > I disagree with "scale invariance is needed only by the schedutil governor"; > > the two other users are the CPU's estimated utilization in the wakeup path, > > via cpu_util_without(), as well as the load-balance path, via cpu_util() which > > is used by update_sg_lb_stats(). > > > > Also remember that scale invariance is applied to both PELT signals util_avg > > and load_avg; schedutil uses the former but not the latter. > > You have been quicker than me to reply. I was about to say the exact > same things. > scale invariance also helps the scheduler in task placement by > stabilizing the metrics whatever the running frequency so a task will > not be seen as a big task just because of a CPU running at lower > frequency So avoiding it just in one specific driver/governor configuration would be inconsistent at best. I guess that leaves us with the impact reduction option, realistically.