Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp586986ybp; Fri, 4 Oct 2019 01:32:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPUCTwieV4vQbHOqne1awR0Uxr4nunoFZMA9K1AJtsuzFgiM9fIM70xV1bL4gtMi8Qr1WP X-Received: by 2002:a05:6402:1501:: with SMTP id f1mr14009886edw.76.1570177963932; Fri, 04 Oct 2019 01:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570177963; cv=none; d=google.com; s=arc-20160816; b=jt4e1WQbLrNuDAo1C2naDDpY+k6AOR4ymVd/kde6KIdAjZrW/zJmyvqKvl61J4yYZd XxNYVHONu6nrLc+ICkfV3XKHn3eECC7tx3RdRF6GSPSTcpCxMeYsP1emM9Axbjz0gQne MESzyAyHt5o58d2Vw1YfkIaaJ8td6PczL4fQphBsh05tX5/KZYR6AFFu1ZEkL8d4hvp9 8iySw2Y6UJ6RIIdRzcwAheDl5ZxSrTB3rQ5B5PZLdoJnQuF6d+CYlc6tW77mNpKReIlc haZFXZUsAdP7La8sbyVMPZTTiTmGDc0gOwGFovz1AsMNeF1xRGb1F9srNaP9iZ4ILH2B 9qOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=0f3o26wbwndHT7/+DiVdBPwYRyHnCXDu+JGjfFi1gZ4=; b=oiF+lPBLhAy/uvDui4I8omnAn1YZZ02BGAqvOvKKqN2T1/UaatiLbhQNXRlPXMo2J1 zMkwue8BhOGVCHsdf7KXY/F+ulnwquB6XwZdzuCCOjj/EINYkudfnk+OH57GmV0Hmb2q S0NCT++yDdOgIVR4Q/v4pVtL4gPPUHpezmrmtttV1HJW6+5xMCK1sui2HQf0w0QJolhD Cr9cQz3lBkxHAAhba26PLSB92JoQlYzRvynJtDEXii681caQw03yk6hX8Nv75PP1/qFa vtnFSXf8Z4k0V679DcDKkiUV8ZCadKIbzCLBrKjV7s9EjvTN8YEVoJNc/LrMRbkix/PF /7xA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g18si3069458edq.209.2019.10.04.01.32.19; Fri, 04 Oct 2019 01:32:43 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729751AbfJDIYR (ORCPT + 99 others); Fri, 4 Oct 2019 04:24:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:49644 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727721AbfJDIYR (ORCPT ); Fri, 4 Oct 2019 04:24:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 503B9AC8B; Fri, 4 Oct 2019 08:24:15 +0000 (UTC) Message-ID: <1570177786.30086.1.camel@suse.cz> Subject: Re: [PATCH v2 2/2] cpufreq: intel_pstate: Conditional frequency invariant accounting From: Giovanni Gherdovich To: Srinivas Pandruvada , "Rafael J. Wysocki" Cc: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Borislav Petkov , Len Brown , x86@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Mel Gorman , Matt Fleming , Viresh Kumar , Juri Lelli , Paul Turner , Vincent Guittot , Quentin Perret , Dietmar Eggemann , Doug Smythies Date: Fri, 04 Oct 2019 10:29:46 +0200 In-Reply-To: <5d6d601d2647644238fc51621407061e1c29320d.camel@linux.intel.com> References: <20191002122926.385-1-ggherdovich@suse.cz> <20191002122926.385-3-ggherdovich@suse.cz> <13106850.QMtCbivBLn@kreacher> <5d6d601d2647644238fc51621407061e1c29320d.camel@linux.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. I understand Srinivas patch to disable MSR accesses during the tick as a band-aid solution to address a specific use case he cares about, but I don't think that extending this approach to any non-schedutil governor is a good idea -- you'd be killing load balancing in the process. Giovanni