Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1148198pxb; Fri, 6 Nov 2020 02:09:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzkuKrphStiYYzRVjFNhFuc2DC402MtGMv3gP15Jjqr8MvHC7wFIJtY+StisaAI4R/a0fTB X-Received: by 2002:a17:906:c1ce:: with SMTP id bw14mr1260358ejb.302.1604657343775; Fri, 06 Nov 2020 02:09:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604657343; cv=none; d=google.com; s=arc-20160816; b=RnX/xfjlpfYUlfS04vsOnMnRyRsibAfmlVA047pht+T75YgK5ljeTCaAIKUCTdv6NA FXC1kMjeJWOjI6bQ1SFpwJrxhJ3NZsGwaBdDUNIQCq8hRD7bMJJzpYfdDURg30aDT+L0 EcLGIDL9VCAjBIKcYV63cmHcMPuQGngUZuk33LSR7cPqYYfacy0jw2ARiXcSBwG/qyd7 RdXg5Z6xVPTYyVNjMlPxeHnyEUUMo3g2SvXiRZ4iXLJ6VzyLMR/0jAd5m8PeZR6QL+CP ZZk5eiOL5kmYa0Iqd8Ues9XDwmH0sDbGQx44O75nxN5SmuO0ZDdw9NardxH5A4nhMy5L AKjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Xh2yyII4BN2Q0eHqaVwfCJTzF58UCCvCSQVIKFDV04Q=; b=z79OuehgLulQ4tq1RTQCTGgfgdSSQ/+ppx+pTQipwbHHQO6LZ53khBIRTl5jBlbhdb yk9qy7SF8IYbUkL5Gp0fPl9wBYequmCPW24PQM2FR8vGD1uw+dltmMEk787Qm7VC+R4W 82I3ymjncoAkQqNk1u0G0v7z5gEx7gwe2WtH58OUOjjpSxBdb/6ava+ZiGGIg8dx3vXP A9a6ayw5La5MS75Z8bPiFzK03KsyMG4yK6u2rT+5sYDhwJmtpixQxLunB2uDfYH9HwGg EZ8BbdQOdmrwS7rjPh9WmaPLAwgIVM2QZTqGbGLA/CLYRQ+cBCViujpEWi7yXKq2cua8 jo4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a9yURkJB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x91si572325edc.41.2020.11.06.02.08.39; Fri, 06 Nov 2020 02:09: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; dkim=pass header.i=@linaro.org header.s=google header.b=a9yURkJB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726250AbgKFKHR (ORCPT + 99 others); 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-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