Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3610096imm; Thu, 17 May 2018 11:30:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqeFLexPMvK88i3fNJQA9AWJgtcPJwChDz8u7XmJnxqJn3ouNY5Z07AxNshBAArfEWORRnM X-Received: by 2002:a62:481d:: with SMTP id v29-v6mr6110842pfa.57.1526581807225; Thu, 17 May 2018 11:30:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526581807; cv=none; d=google.com; s=arc-20160816; b=FkruuT6/UVB7GP2vDSIMDp2al8d4at5WtDw0s25L5AvT7ceSFN3fPdM9vh/vCsT+Pk rPLyCDM9tfo6VeWYUPlaWMGrt7VtzSR1CnjQmC8Ksc4T1LL8q+hRhDrKvbU6Oz5J3Q+9 M+I7sI4V3tbpEv543aEtLfiqaZifVNkSsl4cNr2MrZuaM1v2ZaR2vlXfb3o9OBdXeINv o5jV+xWo0LFSPfVsiDwe02pEbFzAL4Aa+LkQ8Jb+eXxpKETX6GIs4OkUc2YHuBlNvvLc 5unKJ3Ij0OdPyBaJi2JoUG3szcj+QF0UpM5nPO15ellCM9Xiv/NX1EOqTCzQ0+HK8New PtbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=Uc4TiCPD/mAgTfumYSClAZOYxwerjtvRuDcW04SI7cY=; b=h5ZIQQtHb+I0yW46jZTGWmNYGM1WC6aZjIosuFXKA3l/xWyW3XMQXNOk7U004hYEN8 xG7l0797ETxCZQX7J52iyGWzCTAwNwAfDaJIl91LZuu+PMAuPv14GviMaf2eRES0uZ1L asJl8LDYCOLHQ+bHpNW2aU50UEUjlX7hRaD2dhDMFQaiZoUS9dBo6KAEJrBRWq3uabPW V9Ke/nl6a/PdpEJZlR6lvihj2vnN1MRltUpsjl2hAGakeySmyPG5xMmVHMzG6zA7wQ18 BZjNWvF1AzZeeGMOYSMUdXtQMsSX9jM/Qhlhaqe/7Vxqvj8H4hOn77Gq7CE/7xl4Zxth dUhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=nxIEqlb4; 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 z9-v6si6371354plk.94.2018.05.17.11.29.52; Thu, 17 May 2018 11:30:07 -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=@infradead.org header.s=merlin.20170209 header.b=nxIEqlb4; 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 S1752162AbeEQS2i (ORCPT + 99 others); Thu, 17 May 2018 14:28:38 -0400 Received: from merlin.infradead.org ([205.233.59.134]:41964 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751017AbeEQS2g (ORCPT ); Thu, 17 May 2018 14:28:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Uc4TiCPD/mAgTfumYSClAZOYxwerjtvRuDcW04SI7cY=; b=nxIEqlb4Dx0sJDJ4fAXlvrsC+ RGc3MNMdMUo5OknMPmOdYJPPgomQh/5BWMlVNBLC7cMk2ORSj/Vkg2mtJ10QJuByv6+pTVp39ThRk pYbVTtMcK2zu+7tlpwTa6wpPDzYDyX7x6aaY3a69Pts9pIasrYEOUJDzqzfahzwpubGr/fZg4cZPC lnG0nf1ffYaKuEimQnwhDFAyowDqgZXfH7XKCuJ4zOugwNm8jUDosgi2go60fzkyzzNNkYKep5m0W LTIk0a7O4YETl50+gddu7fYQJuW0yst4al/mdLy3wQ22436x0DJPgTjXkVI9Hzhs20cvzsGqCTKxM b/Jo2hiEg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJNdF-0003sP-8d; Thu, 17 May 2018 18:28:05 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C747F2029F86C; Thu, 17 May 2018 20:28:03 +0200 (CEST) Date: Thu, 17 May 2018 20:28:03 +0200 From: Peter Zijlstra To: "Rafael J. Wysocki" Cc: 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 Subject: Re: [RFC/RFT] [PATCH 02/10] cpufreq: intel_pstate: Conditional frequency invariant accounting Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) 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 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? 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.