Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4197794imm; Fri, 18 May 2018 00:38:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrYnFTe2uAlLnAWnJgw7OOOZhXl4snABrOqUy+81Ln43PwurdKkSJ8KlZ4s0QT/c/SBIOIJ X-Received: by 2002:a62:105:: with SMTP id 5-v6mr8306655pfb.1.1526629119513; Fri, 18 May 2018 00:38:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526629119; cv=none; d=google.com; s=arc-20160816; b=asPCEZdAfwwZ4+ShPSvN87v7bA3Gcrbs8idRLLRJPJU7f08KcOcLEhk7Yp+O6lZeA1 ydrAgFXXhg7BM1almsH53FJT97otBEIxnpVl0Hh1PbEbuQ4T7c+oDN1BsDlgw4wQmVQv FlcyFCHh+p7yfOyS6RyqVUPhBRCRhLP+P4HvI2AXNkFI/MDLp6hL2WEkTrJzbCEcgmWG Yd3VibOGnrIrHUwmMz9z1SZUOc1OFwwCrjlCDd/R5vDHojQHdk3AyGzhKaZQYNZaalJi 5YH0OLRbv9cp0HvwUX4IGf5n4yamldEr1TXKtWKEHMeYQSDTrRHM4IKMG76c/tk+zvmc 43mw== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=42c3zsXXR2hJSZ6TXV0UABsNX0qM7gdnOkr3zZ8zOCU=; b=WVrF+hNEWRF6fo6NHxP235ALyT3Ivy55DmjGU5iRdFXpqp5BpNDNQW8RHZji35pR25 relfd1hW0dGJVrZ0J2gG2MIbWKV1DMnCE062I5I55qZJx3gvZDQVKWpr+J4M58czM43j UGHZnbj9B1OvTDFd45Gyz3YXnRqYWWOnqfTzFRaQ0JKkUtDJM1oPSVkPbAT5dUKbS9Kc KsIHxMO6Urb74jQVOLElgKqv4Niel8SUqET/RmtlJnwY89pUj1RAY2AiHHOyOr56Ed+l QWbLSE9a4TX1Xw0I9KVPfyDf1VlPcaOZ8qQFLjPLt6VEvKemSMJ5+5RKj8cY/CMET7B/ m4ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=SFfFVVOm; 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 r63-v6si7111521pfj.331.2018.05.18.00.38.24; Fri, 18 May 2018 00:38:39 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=SFfFVVOm; 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 S1752189AbeERHgn (ORCPT + 99 others); Fri, 18 May 2018 03:36:43 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:44478 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751023AbeERHgl (ORCPT ); Fri, 18 May 2018 03:36:41 -0400 Received: by mail-oi0-f68.google.com with SMTP id e80-v6so6303699oig.11; Fri, 18 May 2018 00:36:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=42c3zsXXR2hJSZ6TXV0UABsNX0qM7gdnOkr3zZ8zOCU=; b=SFfFVVOm+coejJQ1ZiW1kyI3lL9Pn5E+KqpEWlfgI0Oxok6d4+3ZtxxvOkzaqIxg/r yCi2e1ZwScpTdvKwdYp7pB1nGJhCa8awujM/aoF/OWO+yjHAuQj9E0RhGCBqjQ2ZFgu7 ORPe40oL+8dVgIlxjHSNght7o2XAqjWzym4a5l1CYhfvO//8q7CLtJJWUDXQlNxk15aN BsLz1rXIm0VAskM+KoMMvfeDifMZQNmHO63SwK2Z2M/sK2dR9aO27lYerf5QVKuKuDxh PHngUosaOHBLv9iACKY6FqdXuGddISGE8z9tpuinBaMoErNpNqILDTGavCdY1G+gLpbi TULQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=42c3zsXXR2hJSZ6TXV0UABsNX0qM7gdnOkr3zZ8zOCU=; b=S4H8TZAYqU33Ydn6FVcj5nLXR0IcWRsUQvoWB8/icm61uFdYbsA5dPds4+dX91X8hH +9imRXosl2CcrfH/iKgvRidACci1rLGn3DU6A2WEgZA8cSmigMwySr93v52WQXiesnYd rzvS8SSHNtI+rPyGQw3OjA66+5W82zgYVStDT2rUvVsaIWLCWZNvnsrC/ox0c0A5qHgC tDOyw1aV7qdOXWr0zOx0T2dCxVWBaZbERdUrqxzt80d5sekQSrF7OvTFLK9bsF9xbOX9 2lDAkdYFjjR7oD0DGUv86nx0v8uG1KBkHQtODIWxrHphnWsVifqXGVyosKE7qPbriK7B OFEw== X-Gm-Message-State: ALKqPwfj1aE7+FGfHgxmW36qbgFl1v4SOsJtfHeZkwEtGqHb5J8/62oo 6Pcmx96GaZ/E3xFi+J+hPAlwX3HJRN+6Q1RzSIE= X-Received: by 2002:aca:e18b:: with SMTP id y133-v6mr4804002oig.120.1526629000664; Fri, 18 May 2018 00:36:40 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:1468:0:0:0:0:0 with HTTP; Fri, 18 May 2018 00:36:40 -0700 (PDT) In-Reply-To: <20180517182803.GY12217@hirez.programming.kicks-ass.net> References: <20180516044911.28797-3-srinivas.pandruvada@linux.intel.com> <20180516151925.GO28366@localhost.localdomain> <20180516154733.GF12198@hirez.programming.kicks-ass.net> <20180516163105.GP28366@localhost.localdomain> <20180517105907.GC22493@localhost.localdomain> <20180517150418.GF22493@localhost.localdomain> <1526571692.11765.10.camel@linux.intel.com> <20180517161649.GX12217@hirez.programming.kicks-ass.net> <1526575358.11765.14.camel@linux.intel.com> <20180517182803.GY12217@hirez.programming.kicks-ass.net> From: "Rafael J. Wysocki" Date: Fri, 18 May 2018 09:36:40 +0200 X-Google-Sender-Auth: dKXS7_NJsQOG3ySLpY_SIGL_4Pc Message-ID: Subject: Re: [RFC/RFT] [PATCH 02/10] cpufreq: intel_pstate: Conditional frequency invariant accounting To: Peter Zijlstra Cc: "Rafael J. Wysocki" , Srinivas Pandruvada , Juri Lelli , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Len Brown , "Rafael J. Wysocki" , Mel Gorman , "the arch/x86 maintainers" , Linux PM , Viresh Kumar , Linux Kernel Mailing List 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 Thu, May 17, 2018 at 8:28 PM, Peter Zijlstra wrote: > On Thu, May 17, 2018 at 06:56:37PM +0200, Rafael J. Wysocki wrote: >> On Thu, May 17, 2018 at 6:42 PM, Srinivas Pandruvada > >> > What will happen if we look at all core turbo as max and cap any >> > utilization above this to 1024? >> >> I was going to suggest that. > > To the basic premise behind all our frequency scaling is that there's a > linear relation between utilization and frequency, where u=1 gets us the > fastest. > > Now, we all know this is fairly crude, but it is what we work with. > > OTOH, the whole premise of turbo is that you don't in fact know what the > fastest is, and in that respect setting u=1 at the guaranteed or > sustainable frequency makes sense. > > The direct concequence of allowing clipping is that u=1 doesn't select > the highest frequency, but since we don't select anything anyway > (p-code does that for us) all we really need is to have u=1 above that > turbo activation point you mentioned. > > For parts where we have to directly select frequency this obviously > comes apart. > > However; what happens when the sustainable freq drops below our initial > 'max'? Imagine us dropping below the all-core-turbo because of AVX. Then > we're back to running at u<1 at full tilt. > > Or for mobile parts, the sustainable frequency could drop because of > severe thermal limits. Now I _think_ we have the possibility for getting > interrupts and reading the new guaranteed frequency, so we could > re-guage. > > So in theory I think it works, in practise we need to always be able to > find the actual max -- be it all-core turbo, AVX or thermal constrained > frequency. Can we do that in all cases? We should be, but unfortunately that's a dynamic thing. For example, the AVX limit only kicks in when AVX instructions are executed. > I need to go back to see what the complains against Vincent's proposal > were, because I really liked the fact that it did away with all this. That would be the best way to deal with this mess, I agree.