Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2774985imb; Mon, 4 Mar 2019 13:59:56 -0800 (PST) X-Google-Smtp-Source: APXvYqzdWsE6HETYnWazUnREavOUyOXESLCro4MjEjThKxDmNaD7TbPlLj4dtFfkygS5v8mUGII0 X-Received: by 2002:a63:cd10:: with SMTP id i16mr7372781pgg.90.1551736796212; Mon, 04 Mar 2019 13:59:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551736796; cv=none; d=google.com; s=arc-20160816; b=gHjhIqzvC0432oBrYtEFrxeogPlGD8W+w4XojYQx4Zy/YXbwojlEXwZzzDZ23Cb/nG koIU8LWcp55A6TlfVrnlstDALkfTyyx9sGFGUhHhBbnGhDAvQtgSamDKuTf7YL4zendB YlrdAZoOnqSOtzt6D9WzWqYIYRiIWvPNqRcyn3RwuOxIqbCxbUdIl40UBC80aeUIXmi3 W0BsD3S+F+DSrTb1MEXZpd37zwE15X5ySSQsy63jtEL1SpBwR0zHVRp0EjzkLvK/jCIP c6nKIXdQCtdlMaUkM+V9stomfeT5WYMsF7ewL71J5cpRyVFMbFQ+5s+cYr7tduXYeFJl fshw== 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=QNWd3hmUwWVU8rIqywJ4Dcs/vHh+1ZAUu7L3X3c+8m0=; b=JPjR+R4TTLJk2Zg7W7YnvSzJ70ODp7zfpHNfzEgx1rTGcewOB1oLEaCvJuS5dbAJnJ qviPmx4VHuJiOOCr7xbGjFSM8Wt69N5q3rqpc82qZZk+lfrJZXEePI+9kqkEZfW1p9Cf DK2X3VwiS0cMIZV2vQtMcgyr8gO8L7OeHddaAPJfljvlXeLvA1pmpRgLYcUxM7mF7GLh K4ugCSzWKSAUOP0b38/r+2oHtYYV8VL7RLPBsiwNmyVn4aSy+pY1FUp2uCGoTzMlr9bP +V6ZtFAcwXaT3JeLX4dPINkjPwmbzrTkrm6ijdyMsqOQhBQmQkwjJzBTMBYH5YXSZgz3 QTsw== 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 ck6si6870369plb.298.2019.03.04.13.59.40; Mon, 04 Mar 2019 13:59:56 -0800 (PST) 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 S1726418AbfCDV5y (ORCPT + 99 others); Mon, 4 Mar 2019 16:57:54 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:38219 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726054AbfCDV5x (ORCPT ); Mon, 4 Mar 2019 16:57:53 -0500 Received: by mail-ot1-f67.google.com with SMTP id m1so5608639otf.5; Mon, 04 Mar 2019 13:57:53 -0800 (PST) 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=QNWd3hmUwWVU8rIqywJ4Dcs/vHh+1ZAUu7L3X3c+8m0=; b=r6hKjq0ujnH41OloOb5WAgoHAFgVISV/jcVJ6LpeQKvEmn1gokmzzuIZdsVY7OSqkf iRblpU0+Kc09DtCRUJi38lIvVKaZxTHbZap/EbHGxj/aLYYC+Ojcph1oK14vMOWZ4fBI 2U1/T43pMl0BPvE2NrYo6V3U6PnR1IgvLbtW5teSyRwmeP+t2LSUVD/rctW8Tau3QG77 y0D/1Y3UpjH9frNOLf9mCfVqPtMoT00gjyPe+L2vOqws+ofKSQZPbzBrIgB1oCRT6N5e oeIzomwG/cEWKZwQz7X/r9lbM2Rk/VK21ckgBrGHEJu8xMY19WGzHBdsvlB9a66kSrWz 6cZw== X-Gm-Message-State: APjAAAWHOyV1/qgSb8JShhlIslSvd82DwX+Pv0VEG+3xhO5Tbohp8J6L HAeeZmyEx4YQiN+/olyLr/60z/8qDxnT0I1sXbU= X-Received: by 2002:a9d:6498:: with SMTP id g24mr14196098otl.343.1551736672663; Mon, 04 Mar 2019 13:57:52 -0800 (PST) MIME-Version: 1.0 References: <9956076.F4luUDm1Dq@aspire.rjw.lan> <47ce61b9df7701e047ef6f59afd54c854db8a538.camel@linux.intel.com> <9099672e17ea9fc7711b34e92ce5a016afb43a0c.camel@linux.intel.com> In-Reply-To: <9099672e17ea9fc7711b34e92ce5a016afb43a0c.camel@linux.intel.com> From: "Rafael J. Wysocki" Date: Mon, 4 Mar 2019 22:57:40 +0100 Message-ID: Subject: Re: [RFT][PATCH 0/2] cpufreq: intel_pstate: Handle _PPC updates on global turbo disable/enable To: Srinivas Pandruvada Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Linux PM , LKML , Viresh Kumar , Chen Yu , Gabriele Mazzotta 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 Mon, Mar 4, 2019 at 7:06 PM Srinivas Pandruvada wrote: > > [...] > > > There are other methods like PL1 budget limit for such cases. FW > > > can > > > just change the config TDP level. > > > > OK, but that would be done without notification I suppose? > > There is a notification via processor PCI device (B0D4). This is passed > to user space to change the power limits. The new element is called > PPCC and it is exposed via sysfs. What do you mean by "new element" and how exactly is it exposed? > Disabling turbo is not very interesting as there can be more turbo than > non turbo. So you loose lots of performance. So instead you can control > power in turbo region to give you more control. _PPC is even less > interesting as you can't control uncore power. I guess that designers should know about that. The kernel is on the receiving end here. :-) > > > > > > That's fair enough, but the point is that the driver doesn'dev_t > > > > do > > > > the right thing even if the platform does send a _PPC > > > > notification. > > > > > > _PPC notification is to indicate levels in _PSS not to > > > disable/enable > > > turbo via IA32_MISC_*. > > > > I was not talking about notifications, but about what the driver does > > when MSR_IA32_MISC_ENABLE_TURBO_DISABLE is set or unset by FW on the > > fly: this only really works if the change is from unset to set, > > because the range of frequencies to use is restricted then, even > > though user-visible policy limits are not updated. However, if the > > change is from set to unset, the update of policy limits is actually > > necessary for the change to really take effect (otherwise the user > > policy max prevents turbo frequencies from being requested). HWP > > seems to be affected too, for that matter, because the upper limit in > > the MSR is not updated too then AFAICS. > > > > > The platform could have just set _PPC to 1 or to TAR-1. Here _PPC > > > is sent for somthing more than just changing _PSS max > > > level. Do we have bug in if _PPC just changes performance level? > > > > I think that we just need to live with the fact that _PPC may be > > triggered for something more than changing _PSS max. > > I understand the reason why you are doing the change. I investigated > this bugzilla before. I was thinking can udev rules should be enough to > address this issue. But it was not a requirement. > > The change itself is fine. Except may be hide the policy->rwsem in some > header file instead of directly exposing to clients to use. I'm not sure what you mean. I guess that you are talking about intel_pstate_update_max_freq() which acquires policy->rwsem. If so, what exactly is the problem with it?