Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3270630imm; Mon, 6 Aug 2018 01:31:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfclpL/QvROZGjz0z3yBUzkhyE382VCetFNAIR6XCtjXx/uqrrfPUm7lX3qAb4QalquTQ1+ X-Received: by 2002:a62:234d:: with SMTP id j74-v6mr16028045pfj.106.1533544305571; Mon, 06 Aug 2018 01:31:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533544305; cv=none; d=google.com; s=arc-20160816; b=jFcGesG6CaxAsGtk2X81nsqZPMAGyYpfHTytVnu2ITqNq6ROjjq9d8oBwoxifstlTg zQgUvfw499OjaHyiio11xM+oOTvHbS1sRBqpJLy1aFV8DjCWJlrqt15GiVKFsK5qhjMo LEXLE2/tS0Hagm4VcNUsUTNnmg+au+PwfcdzPehO+Mh+HaBWTjveR3/w18Y3XgA2ntk7 qE1/0skrHcfFP9bNoD5QaiuAkQutaUaotRoZtUZnSwSug+vu7U6InVQnXQBh5S6OlcE9 3HDL2G8qmUEPJI/E6C/Nx4T0XXnu3yFgvtx12qaSTgqep/2aWsEasHimWgoZWf7cFe2/ EmEg== 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=eb6Rwmkoid1MF+f2dDa6LWI1AYrLXaJF/yCt2qr+VEY=; b=wZaBomSWRsri7p9VWrP48tqy4PTYqagNwHPKtjRBmWGNzM68unmDsNOA3eMrb6ZZfK RE9nCodcV1AvYN2j9gQCJ5y2D3ucVjlZsezxGUifL064znoV7QRVfhCKWCj26qW/rFGr pDNwVNmDRRbu11nXwpc8InevKzogJ1u5BTcs6aIYgmev7XSGhuMjY48IRhLEvq/bmQqf 8CPmCZ4yEpKom3qE2iZ3+p79lLKsT5Vb5mWEFq6lRF3ar6s+gm07NcPZe2iIq8bUli76 sfkM3qGVd8+yZyI60jJARLY2GMEbODlcL+whvT45DfYGJEmA2Ooh8qWjEBaIQDdMTQUM 1aPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=dVTLcHTo; 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 s198-v6si10142208pgc.381.2018.08.06.01.31.30; Mon, 06 Aug 2018 01:31:45 -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=dVTLcHTo; 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 S1727102AbeHFKih (ORCPT + 99 others); Mon, 6 Aug 2018 06:38:37 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:40762 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725951AbeHFKih (ORCPT ); Mon, 6 Aug 2018 06:38:37 -0400 Received: by mail-oi0-f68.google.com with SMTP id w126-v6so20715761oie.7; Mon, 06 Aug 2018 01:30:40 -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=eb6Rwmkoid1MF+f2dDa6LWI1AYrLXaJF/yCt2qr+VEY=; b=dVTLcHTomtR/XjVn89Z2wB/LkYTCsOT4ia8i1U4FYkWfhXd55N3PdPk36JttYBrxOi SmQ0iMiQZFlbAw/BkaO5Q/SWWzlDidWvNAd03S2akogkaMpGkyGQPm92KdQpUl15EMeF rG1eTaEvRtOOqp8Wz3rAuWa5LVeA/XKZ5Icerdjv7AfcxMmecr9oVyFtpTIECuQPwpMK cJ08kw5aQ1RpQ/2B1//sWEbX0BaJ40I08w1Ucik6qDC03LkrD5bRSCS23R1LknaOu0yL DgPCmYG8vZn5bFpKi9/XddhAqeNzGZMJKdBVj+J4sNm3sNZeBXHegvzUqLd93xi92IxV Zqbg== 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=eb6Rwmkoid1MF+f2dDa6LWI1AYrLXaJF/yCt2qr+VEY=; b=LGUEljheO0Y5lfM+07LN8+aXoTW82sq4K9btUR25iqF0038EuXQvFsh/SObJHp1ptP TAzy9gLJRoaGYrQiOLCPsP0I7FES+GHvP9H//VOUZuXfjYuQiKBgDbT1VXvBZaWhGrCx zBjIAGYiYTe9cNa7Tvf9O+/YNGfS8LoDG8B+h5vhyn7Ja6TE6rdfLnGk8hb/8ia2qyOP J0U8ggeiHq6Zic20wY/S3rTKVrv9VMkhn7kiNEjf2P4cR9v97Btdy85W/NnrhUxYyBrG l/l53/qel/3DqLHz5flDEJAe39uhWe8yvOTvb0GzFiDsajFrLF7DngTGNBYqBJ2B8bqS ubiw== X-Gm-Message-State: AOUpUlHYrcJtG1xeXuE2LlYU2RyZl7epeqwoTlZWAI3/WqR90gmu2vaI wfxJTvMrzjq8cabwDckWAwobms/NV33/rwssefU= X-Received: by 2002:aca:ecd0:: with SMTP id k199-v6mr14615551oih.227.1533544239846; Mon, 06 Aug 2018 01:30:39 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:63d2:0:0:0:0:0 with HTTP; Mon, 6 Aug 2018 01:30:39 -0700 (PDT) In-Reply-To: References: <20180804152932.3861-1-gabriele.mzt@gmail.com> From: "Rafael J. Wysocki" Date: Mon, 6 Aug 2018 10:30:39 +0200 X-Google-Sender-Auth: GPqqLSHabuJrqHf63dlMCiQNVb0 Message-ID: Subject: Re: [PATCH] Revert "cpufreq: intel_pstate: Fix ->set_policy() interface for no_turbo" To: Gabriele Mazzotta Cc: Srinivas Pandruvada , "Rafael J. Wysocki" , Len Brown , Viresh Kumar , Linux PM , 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 Sat, Aug 4, 2018 at 7:31 PM, Gabriele Mazzotta wrote: > On 04/08/2018 17:29, Gabriele Mazzotta wrote: >> This change does not take into account that some BIOSes change >> MSR_IA32_MISC_ENABLE_TURBO_DISABLE depending on the power source. >> If the turbo is disabled when the system boots, policy.max_freq >> is set to pstate.max_pstate. However, if the BIOS later enables >> the turbo, the CPU will never be able to run at pstate.turbo_pstate. >> >> Since now intel_pstate_set_policy() does its calculations using >> pstate.max_freq and pstate.turbo_freq, we can always calculate >> cpuinfo.max_freq using pstate.turbo_pstate, thus allowing system >> with varying MSR_IA32_MISC_ENABLE_TURBO_DISABLE to run at full >> speed when the turbo is enabled. Well, the problem with this approach is that always using pstate.turbo_pstate as the max causes the governor to overestimate the target frequency when the turbo range is not available (the target depends on the width of the entire available P-state range including turbo, so if the turbo range is not available, the number take into that computation is too large). Are we expected to get notified when the BIOS updates MSR_IA32_MISC_ENABLE_TURBO_DISABLE?