public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: mark gross <markgross@thegnar.org>
To: Antti P Miettinen <amiettinen@nvidia.com>
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: [PATCH 2/6] PM QoS: Add CPU frequency min/max as PM QoS params
Date: Fri, 6 Jan 2012 07:30:27 -0800	[thread overview]
Message-ID: <20120106153027.GE12530@mgross-G62> (raw)
In-Reply-To: <1325810186-28986-3-git-send-email-amiettinen@nvidia.com>

On Fri, Jan 06, 2012 at 02:36:22AM +0200, Antti P Miettinen wrote:
> Add minimum and maximum CPU frequency as PM QoS parameters.
> 
> Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
> ---
>  include/linux/pm_qos.h |    5 +++++
>  kernel/power/qos.c     |   32 +++++++++++++++++++++++++++++++-
>  2 files changed, 36 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
> index 5ac91d8..7b8d08b 100644
> --- a/include/linux/pm_qos.h
> +++ b/include/linux/pm_qos.h
> @@ -14,8 +14,11 @@ enum {
>  	PM_QOS_CPU_DMA_LATENCY,
>  	PM_QOS_NETWORK_LATENCY,
>  	PM_QOS_NETWORK_THROUGHPUT,
> +	PM_QOS_CPU_FREQ_MIN,
> +	PM_QOS_CPU_FREQ_MAX,
What is this about?  How sould freq_max make any sense in the context of
constraining power mangement throutling?  this is wrong.

You should only have a cpu throughput qos.  I.e. FREQ_MIN.
FWIW in my patch I named it : PM_QOS_CPU_THROUGHPUT  but, its just a
different name to your PM_QOS_CPU_FREQ_MIN name.


>  
>  	/* insert new class ID */
> +
>  	PM_QOS_NUM_CLASSES,
>  };
>  
> @@ -25,6 +28,8 @@ enum {
>  #define PM_QOS_NETWORK_LAT_DEFAULT_VALUE	(2000 * USEC_PER_SEC)
>  #define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE	0
>  #define PM_QOS_DEV_LAT_DEFAULT_VALUE		0
> +#define PM_QOS_CPU_FREQ_MIN_DEFAULT_VALUE	0
> +#define PM_QOS_CPU_FREQ_MAX_DEFAULT_VALUE	LONG_MAX

PM_QOS_FREQ_MAX must go away.

--mark

>  
>  struct pm_qos_request {
>  	struct plist_node node;
> diff --git a/kernel/power/qos.c b/kernel/power/qos.c
> index d6d6dbd..66ae05e 100644
> --- a/kernel/power/qos.c
> +++ b/kernel/power/qos.c
> @@ -101,11 +101,41 @@ static struct pm_qos_object network_throughput_pm_qos = {
>  };
>  
>  
> +static BLOCKING_NOTIFIER_HEAD(cpu_freq_min_notifier);
> +static struct pm_qos_constraints cpu_freq_min_constraints = {
> +	.list = PLIST_HEAD_INIT(cpu_freq_min_constraints.list),
> +	.target_value = PM_QOS_CPU_FREQ_MIN_DEFAULT_VALUE,
> +	.default_value = PM_QOS_CPU_FREQ_MIN_DEFAULT_VALUE,
> +	.type = PM_QOS_MAX,
> +	.notifiers = &cpu_freq_min_notifier,
> +};
> +static struct pm_qos_object cpu_freq_min_pm_qos = {
> +	.constraints = &cpu_freq_min_constraints,
> +	.name = "cpu_freq_min",
> +};
> +
> +
> +static BLOCKING_NOTIFIER_HEAD(cpu_freq_max_notifier);
> +static struct pm_qos_constraints cpu_freq_max_constraints = {
> +	.list = PLIST_HEAD_INIT(cpu_freq_max_constraints.list),
> +	.target_value = PM_QOS_CPU_FREQ_MAX_DEFAULT_VALUE,
> +	.default_value = PM_QOS_CPU_FREQ_MAX_DEFAULT_VALUE,
> +	.type = PM_QOS_MIN,
> +	.notifiers = &cpu_freq_max_notifier,
> +};
> +static struct pm_qos_object cpu_freq_max_pm_qos = {
> +	.constraints = &cpu_freq_max_constraints,
> +	.name = "cpu_freq_max",
> +};
> +
> +
>  static struct pm_qos_object *pm_qos_array[] = {
>  	&null_pm_qos,
>  	&cpu_dma_pm_qos,
>  	&network_lat_pm_qos,
> -	&network_throughput_pm_qos
> +	&network_throughput_pm_qos,
> +	&cpu_freq_min_pm_qos,
> +	&cpu_freq_max_pm_qos
>  };
>  
>  static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf,
> -- 
> 1.7.4.1
> 
> _______________________________________________
> linux-pm mailing list
> linux-pm@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/linux-pm

  reply	other threads:[~2012-01-06 15:30 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-06  0:36 [PATCH 0/6] RFC: CPU frequency min/max as PM QoS params Antti P Miettinen
2012-01-06  0:36 ` [PATCH 1/6] PM QoS: Simplify PM QoS expansion/merge Antti P Miettinen
2012-01-06 15:24   ` mark gross
2012-01-08 23:03     ` Rafael J. Wysocki
2012-01-06  0:36 ` [PATCH 2/6] PM QoS: Add CPU frequency min/max as PM QoS params Antti P Miettinen
2012-01-06 15:30   ` mark gross [this message]
2012-01-06 19:32     ` Antti P Miettinen
2012-01-07  3:47       ` mark gross
2012-01-07  8:54         ` Antti P Miettinen
2012-01-06  0:36 ` [PATCH 3/6] cpufreq: Export user_policy min/max Antti P Miettinen
2012-01-06 15:33   ` mark gross
2012-01-06 19:29     ` Antti P Miettinen
2012-01-07  3:53       ` mark gross
2012-01-07  8:47         ` Antti P Miettinen
2012-01-09 14:18           ` mark gross
2012-01-06  0:36 ` [PATCH 4/6] cpufreq: Preserve sysfs min/max request Antti P Miettinen
2012-01-06  0:36 ` [PATCH 5/6] cpufreq: Enforce PM QoS min/max limits Antti P Miettinen
2012-01-06 15:38   ` mark gross
2012-01-06  0:36 ` [PATCH 6/6] input: CPU frequency booster Antti P Miettinen
2012-01-06 15:40   ` mark gross
2012-01-06 15:18 ` [PATCH 0/6] RFC: CPU frequency min/max as PM QoS params mark gross
2012-01-06 15:46 ` mark gross
2012-01-06 19:38   ` Antti P Miettinen
2012-01-07  2:57     ` mark gross
2012-01-06 18:27 ` mark gross
2012-01-08 22:59   ` Rafael J. Wysocki
2012-01-09 14:23     ` mark gross
2012-01-09 21:27       ` Rafael J. Wysocki
2012-01-09 21:57         ` Antti P Miettinen
2012-01-10 20:44           ` Rafael J. Wysocki
2012-01-11  7:26             ` Antti P Miettinen
2012-01-11 23:15               ` Rafael J. Wysocki
2012-01-12  8:37                 ` Antti P Miettinen
2012-01-12 23:55                   ` Rafael J. Wysocki
2012-01-10  4:50         ` mark gross
2012-01-10 20:46           ` Rafael J. Wysocki
2012-01-10 21:02             ` Jean Pihet
2012-01-11  7:32               ` Antti P Miettinen
2012-01-11 23:00                 ` Rafael J. Wysocki
2012-01-12  8:43                   ` Antti P Miettinen
2012-01-13  4:37                     ` mark gross
2012-01-12  3:06               ` mark gross
2012-01-12 23:52                 ` Rafael J. Wysocki
2012-01-12  3:01             ` mark gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120106153027.GE12530@mgross-G62 \
    --to=markgross@thegnar.org \
    --cc=amiettinen@nvidia.com \
    --cc=linux-pm@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox