All of lore.kernel.org
 help / color / mirror / Atom feed
From: mark gross <markgross@thegnar.org>
To: Antti P Miettinen <amiettinen@nvidia.com>
Cc: davej@redhat.com, cpufreq@vger.kernel.org, pavel@ucw.cz,
	rjw@sisk.pl, len.brown@intel.com, linux-pm@vger.kernel.org,
	mgross@linux.intel.com
Subject: Re: [PATCH v2 2/8] PM QoS: Add CPU frequency minimum as PM QoS param
Date: Sat, 14 Jan 2012 20:46:06 -0800	[thread overview]
Message-ID: <20120115044606.GB2409@mgross-G62> (raw)
In-Reply-To: <1326459559-5436-3-git-send-email-amiettinen@nvidia.com>

For some reason git am doesn't work with this so I had to use patch by
hand.



On Fri, Jan 13, 2012 at 02:59:13PM +0200, Antti P Miettinen wrote:
> Add minimum CPU frequency as PM QoS parameter.
> 
> Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
> ---
>  include/linux/pm_qos.h |    3 +++
>  kernel/power/qos.c     |   17 ++++++++++++++++-
>  2 files changed, 19 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
> index 5ac91d8..54a0d00 100644
> --- a/include/linux/pm_qos.h
> +++ b/include/linux/pm_qos.h
> @@ -14,8 +14,10 @@ enum {
>  	PM_QOS_CPU_DMA_LATENCY,
>  	PM_QOS_NETWORK_LATENCY,
>  	PM_QOS_NETWORK_THROUGHPUT,
> +	PM_QOS_CPU_FREQ_MIN,
>  
>  	/* insert new class ID */
> +
>  	PM_QOS_NUM_CLASSES,
>  };
>  
> @@ -25,6 +27,7 @@ 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
Perhaps "#define PM_QOS_CPU_FREQ_MIN_DEFAULT_KHZ	0" might be
more descriptive.

Its nice to have the code a bit self documenting and we are missing any
comments on what units the FREQ are in.  (they are in the same units
that cpufreq uses.  KHz)

Also we need to update the Documentation/power/pm_qos_interface.txt
to explain cpu_freq_min's units.

other than this (and the git am issue) this looks good to me.

--mark
>  
>  struct pm_qos_request {
>  	struct plist_node node;
> diff --git a/kernel/power/qos.c b/kernel/power/qos.c
> index d6d6dbd..07d761a 100644
> --- a/kernel/power/qos.c
> +++ b/kernel/power/qos.c
> @@ -101,11 +101,26 @@ 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 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,
>  };
>  
>  static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf,
> -- 
> 1.7.4.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-01-15  4:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13 12:59 [PATCH v2 0/8] RFC: CPU frequency min/max as PM QoS params Antti P Miettinen
2012-01-13 12:59 ` [PATCH v2 1/8] PM QoS: Simplify PM QoS expansion/merge Antti P Miettinen
2012-01-15  4:37   ` mark gross
2012-01-13 12:59 ` [PATCH v2 2/8] PM QoS: Add CPU frequency minimum as PM QoS param Antti P Miettinen
2012-01-15  4:46   ` mark gross [this message]
2012-01-13 12:59 ` [PATCH v2 3/8] cpufreq: Export user_policy min/max Antti P Miettinen
2012-01-13 12:59 ` [PATCH v2 4/8] cpufreq: Preserve sysfs min/max request Antti P Miettinen
2012-01-13 12:59 ` [PATCH v2 5/8] cpufreq: Enforce PM QoS minimum limit Antti P Miettinen
2012-01-15  4:51   ` mark gross
2012-01-13 12:59 ` [PATCH v2 6/8] input: CPU frequency booster Antti P Miettinen
2012-01-13 12:59 ` [PATCH v2 7/8] PM QoS: Add CPU frequency maximum as PM QoS param Antti P Miettinen
2012-01-15  4:51   ` mark gross
2012-01-13 12:59 ` [PATCH v2 8/8] cpufreq: Enforce PM QoS maximum frequency Antti P Miettinen
2012-01-13 15:24 ` [PATCH v2 0/8] RFC: CPU frequency min/max as PM QoS params mark gross
2012-01-13 16:17   ` Antti P Miettinen
2012-01-16  6:59 Antti P Miettinen
2012-01-16  6:59 ` [PATCH v2 2/8] PM QoS: Add CPU frequency minimum as PM QoS param Antti P Miettinen

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=20120115044606.GB2409@mgross-G62 \
    --to=markgross@thegnar.org \
    --cc=amiettinen@nvidia.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=davej@redhat.com \
    --cc=len.brown@intel.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.