diff options
author | Alex Frid <afrid@nvidia.com> | 2011-12-16 13:44:23 -0800 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2011-12-22 14:05:19 +0530 |
commit | 868313eb1f9ec8d035b8878e1a5ffe287202d30a (patch) | |
tree | b6296cb13f1e53299364c123201353c95edd09b5 | |
parent | 943c8415dc9940550e5a228f095ff8e68100b18a (diff) |
PM QoS: Add max online cpus as PM QoS parameter
Bug 894200
Change-Id: Ieb009a13c6ef9bca2388e234eb973d65a4e3a58b
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/71034
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
-rw-r--r-- | include/linux/pm_qos_params.h | 2 | ||||
-rw-r--r-- | kernel/pm_qos_params.c | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/pm_qos_params.h b/include/linux/pm_qos_params.h index c1f1775b317f..eee55bc0b667 100644 --- a/include/linux/pm_qos_params.h +++ b/include/linux/pm_qos_params.h @@ -13,6 +13,7 @@ enum { PM_QOS_CPU_DMA_LATENCY, PM_QOS_NETWORK_LATENCY, PM_QOS_NETWORK_THROUGHPUT, + PM_QOS_MAX_ONLINE_CPUS, /* insert new class ID */ @@ -24,6 +25,7 @@ enum { #define PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) #define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) #define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE 0 +#define PM_QOS_MAX_ONLINE_CPUS_DEFAULT_VALUE LONG_MAX struct pm_qos_request_list { struct plist_node list; diff --git a/kernel/pm_qos_params.c b/kernel/pm_qos_params.c index d6a47e480f7a..06e74202a8b9 100644 --- a/kernel/pm_qos_params.c +++ b/kernel/pm_qos_params.c @@ -103,12 +103,23 @@ static struct pm_qos_object network_throughput_pm_qos = { .type = PM_QOS_MAX, }; +static BLOCKING_NOTIFIER_HEAD(max_online_cpus_notifier); +static struct pm_qos_object max_online_cpus_pm_qos = { + .requests = PLIST_HEAD_INIT(max_online_cpus_pm_qos.requests), + .notifiers = &max_online_cpus_notifier, + .name = "max_online_cpus", + .target_value = PM_QOS_MAX_ONLINE_CPUS_DEFAULT_VALUE, + .default_value = PM_QOS_MAX_ONLINE_CPUS_DEFAULT_VALUE, + .type = PM_QOS_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, + &max_online_cpus_pm_qos }; static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf, |