lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 08 Aug 2012 17:14:51 +0900
From:	Jonghwa Lee <jonghwa3.lee@...sung.com>
To:	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	Pavel Machek <pavel@....cz>, "Rafael J. Wysocki" <rjw@...k.pl>,
	Len Brown <len.brown@...el.com>,
	Jonghwa Lee <jonghwa3.lee@...sung.com>,
	Kyungmin Park <kyungmin.park@...sung.com>
Subject: [PATCH] PM QoS: Add a metric : Bus Throughput.

Bus throughput metric is added to PM QoS in order to control the
frequency of memory interfaces and busses with PM QoS.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@...sung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@...sung.com>
---
 include/linux/pm_qos.h |    2 ++
 kernel/power/qos.c     |   15 ++++++++++++++-
 2 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
index 233149c..6db4939 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -15,6 +15,7 @@ enum {
 	PM_QOS_CPU_DMA_LATENCY,
 	PM_QOS_NETWORK_LATENCY,
 	PM_QOS_NETWORK_THROUGHPUT,
+	PM_QOS_BUS_DMA_THROUGHPUT,
 
 	/* insert new class ID */
 	PM_QOS_NUM_CLASSES,
@@ -26,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_BUS_DMA_THROUGHPUT_DEFAULT_VALUE	0
 
 struct pm_qos_request {
 	struct plist_node node;
diff --git a/kernel/power/qos.c b/kernel/power/qos.c
index 6a031e6..75322cc 100644
--- a/kernel/power/qos.c
+++ b/kernel/power/qos.c
@@ -100,12 +100,25 @@ static struct pm_qos_object network_throughput_pm_qos = {
 	.name = "network_throughput",
 };
 
+static BLOCKING_NOTIFIER_HEAD(bus_dma_throughput_notifier);
+static struct pm_qos_constraints bus_dma_tput_constraints = {
+	.list = PLIST_HEAD_INIT(bus_dma_tput_constraints.list),
+	.target_value = PM_QOS_BUS_DMA_THROUGHPUT_DEFAULT_VALUE,
+	.default_value = PM_QOS_BUS_DMA_THROUGHPUT_DEFAULT_VALUE,
+	.type = PM_QOS_MAX,
+	.notifiers = &bus_dma_throughput_notifier,
+};
+static struct pm_qos_object bus_dma_throughput_pm_qos = {
+	.constraints = &bus_dma_tput_constraints,
+	.name = "bus_dma_throughput",
+};
 
 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,
+	&bus_dma_throughput_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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ