Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp640365pxu; Fri, 23 Oct 2020 09:34:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlIwO/bSkoBQHieILBKCkLsW6SP0CadHo/XS+uRbv9vIPzduYr7MrDTGLWnwuVsWPbPW7K X-Received: by 2002:aa7:d783:: with SMTP id s3mr3107904edq.214.1603470888634; Fri, 23 Oct 2020 09:34:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603470888; cv=none; d=google.com; s=arc-20160816; b=RkUSR5x7HZQjlDST1YDIS31omPf4UfAcK1XA44t9Agk5pNPrTqejjYFKYHO8+05bqu VAWVpKeEctiglvPxST1U885OCwovxZWROWhoAVJBdA5/+m7Pg5mYKQNLgHh3ocXMx3vv D0WmHTwrFfYL4m5UaGCZoE8w6RR0AsvhtOTF/Rz7AH4pKJs8JXljKIfTfwVHhqgwAhO2 Y/X2uPb6LCajhahf8dnfxfUee5HN2qdMowOBifComqmfK07rOwre+FeXS1zmVV1Tgcf7 TPDskqSZi+vTLZME/tpboAfwBm119hKlC1wOvHFSSl3hD+NYwRfUtmDWgWKGN+SS8HzF OzFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=P568jAkhakEiqZKWUjRvi4Qda8uVDBdVfcF5ni5L1Fc=; b=O4WxDBAVfrA7DdoAEPxRaWwQBeATJ2D6DSviuJfzdtCUtyStz8mpBeFC8kYNCxYiHV rbUux4fulwZIyRSy5FAr9QM+6APjWXdEHLo6eC70ZQOlU+m91+OAnS/0Mk1gPQ8swJw0 DMYVj0TwaoDoJXsil7Xx2hCVHrM1wyuhbIa29HAzaX4KWtR58CQImRhE4vIcxf0dtsT1 qi5Jiz47MYpolEojTKrI/PCDgUCbkY/moY/9y/4gj/EqTQVw0b46hW/u5Bcb3FLBCjPi /F5Vo8eSGMtqgF7dgiiaiJIJabscP+HPlh7PUxuqIUNMzP6IpgRHgFxTrP5aOtMPyQae BDJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e18si1183887eji.106.2020.10.23.09.34.26; Fri, 23 Oct 2020 09:34:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750923AbgJWPgw (ORCPT + 99 others); Fri, 23 Oct 2020 11:36:52 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:53802 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750907AbgJWPgv (ORCPT ); Fri, 23 Oct 2020 11:36:51 -0400 Received: from 89-64-88-190.dynamic.chello.pl (89.64.88.190) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.491) id ee32e835f268b9f3; Fri, 23 Oct 2020 17:36:48 +0200 From: "Rafael J. Wysocki" To: Linux PM , Viresh Kumar Cc: LKML , Srinivas Pandruvada , Zhang Rui Subject: [PATCH v2 0/4] cpufreq: intel_pstate: Avoid missing HWP max limit updates with powersave governor Date: Fri, 23 Oct 2020 17:21:50 +0200 Message-ID: <2183878.gTFULuzKx9@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All, There is a problem in intel_pstate that if it works in the passive mode with HWP enabled, changing the policy max frequency may not cause the HWP max limit to be updated accordingly which is quite confusing and may be incorrect. That happens because of two checks, one in the cpufreq core and one in the driver itself, that are there to avoid unnecessary HW/FW updates when the current frequency doesn't change. Of course, that is the case when the policy max limit changes under the "powersave" governor (which sets the current frequency to the policy min limit) and in that particular case, the checks turn out to be harmful. There is also an analogous problem in the schedutil governor that prevents driver callbacks from being invoked if the target frequency doesn't change and which also affects intel_pstate in the passive mode with HWP enabled (see the changelog of patch [4/4]). The v2 addresses some review comments from Viresh and adds patches [3-4/4] to address the schedutil issue. The cleanup posted as the [2/2] previously will be applied independently and it is not included in the v2. Thanks!