Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3810576pxu; Mon, 30 Nov 2020 10:42:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJxqKCXZ1NFCSgAHT3U5swP/wouDKDKbvBZZg+ke8UE6b7lJWbGr2EDbp8ufl0PDDNHGSEXX X-Received: by 2002:a05:6402:b10:: with SMTP id bm16mr23148765edb.214.1606761723053; Mon, 30 Nov 2020 10:42:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606761723; cv=none; d=google.com; s=arc-20160816; b=05+lbNOA2EA2EvRuz0RI/xIeKsmMKxvLtnvGF7xCtFluZ36VebXOKTpf9pqKYvBzJH nWQWV+QiHarWuU/fIfz0DLfTUk/K+DOQYQTDy6N1i08bJxH2SDbyMXFmXoLZi+pDssbN ph64u+X+uzYT87VrLHNkkf/IZsZGT2G+8azo7awJDDd3h+etibCYVxdwP4uRjRXujni6 R43//0S6WnlW6S7W2EQo/RxG1gvIYE0kZ0XAs0Rf6UszquYsAa/K/NzR75TJos/MphY2 +W2BYNgcf7aARARl9MGmEMlJHgk4oJIXNxHjMTP6RIHhpV1AOOjQF4fDjW1S6wZoNori aHoQ== 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=Eo6xa3TCMrDKKO4WcsEKhIfhfYwVZRF1V8O93uPAAxA=; b=Ads5swcw064oza1nyIOGSwsfWZp8jfcgYVQRztloO9/AG0+x6LWXNfHIhFIAJiyUeE HiQEzSUXxVomrl2Ouo0ihKsvGEsmQvQ/ra3c5LXaMK01gQjzT8zzvJWMvqNSUk+BXNmq yZLw+7CuY/ufa+uYQA6J9hDJscoTHxT3YCtOXx04+HX06SbtI9UoG+A6eq9ipKNVzdQG 0GJ5iJZXzQ6XgOZGHVk7y6OtTsbfuknu9Gv0jyja20WMJ4HdBxTWLupV9wTwQ6+We/UZ ikk9q0J1Fpr88d8rzefBiMg3cwz7O6Hjjy9kRaJNGr/pVfq5FydV9lg/eaOg/RLrk/8G oXrQ== 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 s24si11664938edw.151.2020.11.30.10.41.39; Mon, 30 Nov 2020 10:42:03 -0800 (PST) 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 S2388160AbgK3Sjv (ORCPT + 99 others); Mon, 30 Nov 2020 13:39:51 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:46014 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388112AbgK3Sju (ORCPT ); Mon, 30 Nov 2020 13:39:50 -0500 Received: from 89-64-87-210.dynamic.chello.pl (89.64.87.210) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.530) id 1d25a2f50d092b2e; Mon, 30 Nov 2020 19:39:08 +0100 From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Viresh Kumar , Srinivas Pandruvada , Peter Zijlstra , Doug Smythies , Giovanni Gherdovich Subject: [RFC][PATCH 0/2] cpufreq: Allow drivers to receive more information from the governor Date: Mon, 30 Nov 2020 19:33:49 +0100 Message-ID: <1817571.2o5Kk4Ohv2@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, Using intel_pstate in the passive mode with HWP enabled, in particular under the schedutil governor, is still kind of problematic, because it has to assume that it should not allow the frequency to fall below the one requested by the governor. For this reason, it translates the target frequency into HWP.REQ.MIN which generally causes the processor to run a bit too fast. Moreover, this allows the HWP algorithm to use any frequency between the target one and HWP.REQ.MAX that corresponds to the policy max limit and some workloads cause it to go for the max turbo frequency prematurely which hurts energy- efficiency without improving performance, even though the schedutil governor itself would not allow the frequency to ramp up so fast. This patch series attempts to improve the situation by introducing a new driver callback allowing the driver to receive more information from the governor. In particular, this allows the min (required) and target (desired) performance levels to be passed to it and those can be used to give better hints to the hardware. Patch [1/2] updates the core and the schedutil governor and patch [2/2] modifies intel_pstate to use the new callback when appropriate. Please refer to the patch changelogs for details. Thanks!