From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44521C55178 for ; Fri, 6 Nov 2020 10:07:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D1D54206CB for ; Fri, 6 Nov 2020 10:07:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="a9yURkJB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726725AbgKFKHR (ORCPT ); Fri, 6 Nov 2020 05:07:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbgKFKHQ (ORCPT ); Fri, 6 Nov 2020 05:07:16 -0500 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E3A8C0613D2 for ; Fri, 6 Nov 2020 02:07:15 -0800 (PST) Received: by mail-pl1-x642.google.com with SMTP id j5so442132plk.7 for ; Fri, 06 Nov 2020 02:07:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Xh2yyII4BN2Q0eHqaVwfCJTzF58UCCvCSQVIKFDV04Q=; b=a9yURkJBvngqIkd0EW7So3jIDwRAQ3W43yeEA/MT3DTidowcoOWa4sDGM6UqBT6Yr2 AV4QEi2bzh/xRSGsRZHtPN6U8hatlLN0X4CMa/Jg+91WXv/T2U+9w8LYjBQ9/OgQANMb +8LR1nrQY4uasl1uyyfvxLdXjeMOJDZGtVdq+GQkH+eQQwAIX3PJzLRcnYFAdti17eME wIL8CHpY4x48ljBxbzxklflYrRccsCGi3LQEZqnK6Ipzjon0tuRjLUC90PQUjEc0xofq l7LzfJkET9NcFMkczfmzwqQpr5s/8lxlOgGjPR2EmFqbLXJ+3jOGDZj6EIp1Sz1qmOxV 41oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Xh2yyII4BN2Q0eHqaVwfCJTzF58UCCvCSQVIKFDV04Q=; b=rCF5vDM7woOEZXGRvZCMV5lrJQ6zUoJI9YERznvJhTjdZCBRjXB9vaXYhuOOrvXzuI 9GyPoaXMrEBSugQ5q01hWFc7RemZBZZ7PcvXCalIdpLzqpkFmWqGkvgKKKDRv+7b51cf yXUCaifb9yyXKdT5ibp3e5CJ13W6w3+upBwKqa1OPCndXQXR2UdXqbhaqQtlQtqNhVoX ZG0HfXW6gyP4lj7YVQi+AmSAvSnfNcLnpA0YDhJ7zBSMmmAm1P+9AVlzk4ZbZNrqW0xx 19vl51bpHqefo2NrKeVee0fYRUb94xwLqbzMFpVBHPLqfZhDI2FQn/t7fl38sUPlcEMM SJcw== X-Gm-Message-State: AOAM533H8rgUNqgPNYarRL8aea6977VqlKE9JbA/6ZoPIcKpeGSyRj7q h1TCvPbN7EoL7noLcqS8aLIJPQ== X-Google-Smtp-Source: ABdhPJyVGNKHMQmLlALereriRPy7JZsHpyOHgoK9YawOfeu1b2OHOCZOlor3Gbdw0tJqF5fBHI8XBA== X-Received: by 2002:a17:902:724c:b029:d5:c1de:e34e with SMTP id c12-20020a170902724cb02900d5c1dee34emr1106053pll.71.1604657235380; Fri, 06 Nov 2020 02:07:15 -0800 (PST) Received: from localhost ([122.172.12.172]) by smtp.gmail.com with ESMTPSA id ck21sm1755608pjb.56.2020.11.06.02.07.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Nov 2020 02:07:14 -0800 (PST) Date: Fri, 6 Nov 2020 15:37:12 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: Linux PM , "Rafael J. Wysocki" , Srinivas Pandruvada , Zhang Rui , LKML Subject: Re: [PATCH 1/2] cpufreq: Introduce target min and max frequency hints Message-ID: <20201106100712.u336gbtblaxr2cit@vireshk-i7> References: <7417968.Ghue05m4RV@kreacher> <2233690.N3OVLkotou@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2233690.N3OVLkotou@kreacher> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05-11-20, 19:23, Rafael J. Wysocki wrote: > Index: linux-pm/include/linux/cpufreq.h > =================================================================== > --- linux-pm.orig/include/linux/cpufreq.h > +++ linux-pm/include/linux/cpufreq.h > @@ -63,6 +63,8 @@ struct cpufreq_policy { > > unsigned int min; /* in kHz */ > unsigned int max; /* in kHz */ > + unsigned int target_min; /* in kHz */ > + unsigned int target_max; /* in kHz */ > unsigned int cur; /* in kHz, only needed if cpufreq > * governors are used */ > unsigned int suspend_freq; /* freq to set during suspend */ Rafael, honestly speaking I didn't like this patch very much. We need to fix a very specific problem with the intel-pstate driver when it is used with powersave/performance governor to make sure the hard limits are enforced. And this is something which no one else may face as well. What about doing something like this instead in the intel_pstate driver only to get this fixed ? if (!strcmp(policy->governor->name, "powersave") || !strcmp(policy->governor->name, "performance")) hard-limit-to-be-enforced; This would be a much simpler and contained approach IMHO. -- viresh